CertImport
This API imports certificate and its private Key, if required.
URL
<http/https>://<host-name>:<Port>/protectappws/services/rest/certImport
Input Parameters
Parameter | Description |
---|---|
username | User name. |
password | Password associated with the user. |
certname | Name of the certificate to import. |
certisdeletable | Sets whether the certificate can be deleted via the API, default is false. |
certisexportable | Sets whether the certificate can be exported via the API, default is false. |
certificate | Certificate to be imported, in PKCS1, PKCS#8, or PKCS#12 format. |
certpassword | Optional, if password provided certificate must be Hex encoded. |
certAlias | Client certificate alias for making SSL connections (optional). |
certPass | Password for the provided certificate alias (optional). |
Sample REST call for cxf
request
response
Sample SOAP Parameters
Output
boolean – indicates import success.
Note
To import a PKCS12 certificate using web , you must provide the
certpassword
field in import request. In this case, certificate datatag must be sent in Hex Format. The sample certificates are included as a convenience. You can also use your own certificates, just be sure that your PKCS#12 certificate is encrypted using 3DES, otherwise you will see the error:
“1559: Certificate could not be verified”
. If you need to create your own PKCS#12 certificate using 3DES, you can use openssl, with the following statement as a guide:openssl pkcs12 -keypbe PBE-SHA1-3DES -certpbe PBE-SHA1-3DES -export -in cert.txt -inkey privateKeyInPKCS1 -out thepkcs12.cert -name someCommonNameForCert