Cert_Export
This API exports certificate and its private Key, if required.
URL
<http/https>://<host-name>:<Port>/protectappws/services/rest/certExport
Input Parameters
Parameter | Description |
---|---|
username | User name (optional). |
password | Password associated with the user (optional). |
certname | Name of the certificate to export. |
certformat | This option is required if private key will be exported along with the certificate. Valid values are — 1: representing PEM-PKCS#1 format — 8: representing PEM-PKCS#8 format. |
certAlias | Client certificate alias for making SSL connections (optional). |
certPass | Password for the provided certificate alias (optional). |
Sample REST call for cxf
request
{
"Cert_Export": {
"username": "cryptouser",
"password": "safenet123",
"certname": "safmplded343",
"certformat": "1"
}
}
response
{
"certExportResponse": " -----BEGIN CERTIFICATE-----
MIIDvzCCAqegAwIBAgIDAKLeMA0GCSqGSIb3DQEBCwUAMIGbMQswCQYDVQQGEwJV
UzELMAkGA1UECBMCQ0ExFTATBgNVBAcTDFJlZHdvb2QgQ2l0eTEUMBIGA1UEChML....[sample truncated for brevity
]
-----END CERTIFICATE-----"
}
Sample SOAP Parameters
<prot:Cert_Export>
<!--Optional:-->
<username>cryptouser</username>
<!--Optional:-->
<password>qwerty1234</password>
<certname>pkcs1sample</certname>
<!--Optional:-->
<certformat></certformat>
</prot:Cert_Export>
Output
Exported certificate and the private key in PKCS#1 or PKCS#8 format.
<ns1:Cert_ExportResponse xmlns:ns1="http://dsws.org/protectappws/">-----BEGIN CERTIFICATE----- MIIDvzCCAqegAwIBAgIDAJ5EMA0GCSqGSIb3DQEBCwUAMIGbMQswCQYDVQQGEwJV [… sample truncated for brevity … ]
OcqQnevrP4rbUC/5W6+gO0m5ZjMDKryAyW4RiNCboGKtVTVcz68J0+75RTvycjWK
ibEI
-----END CERTIFICATE-----</ns1:Cert_ExportResponse>