Import a Self-signed or CA-signed
Certificate
You can import a
certificate with a private key to replace the default self-signed certificate,
after activation.
- Verify that a certificate is available.
- The server certificate must contain the Basic Constraints extensionbasicConstraints = cA:FALSE.
You can import self-signed or CA-signed
certificates for platform or services using this procedure with the following
exceptions:
- A CSR generated onNSX Managerwhich is self-signed cannot be used as a service certificate, such as the Load Balancer service. If you want to import a CA certificate for the Load Balancer service, see Import a CA Certificate.
- On a stand-byGlobal Manager, the UI import operation is deactivated. Use the following REST API command to complete the import of a platform certificate on the standby GM. The display name is optional, but if not used, ensure the last attribute does not contain a trailing comma. Be sure to replace any end of line character with \n. The entire certificate should be provided in a single line. In order to replace newline characters with \n, you can use this command on UNIX based systems to convert each .pem (certificate and key) file to a value that can be passed in a JSON string to theNSXAPI:awk 'NF {sub(/\r/, ""); printf "%s\\n",$0;}' certificate-name.pem. The new format places all the certificate information on a single line with embedded newline characters.For example:POST https://<nsx-mgr>/api/v1/trust-management/certificates?action=import { "display_name": "cert_sample", "pem_encoded": "-----BEGIN CERTIFICATE-----\nMIIC1CCDAbygAwIBAgIUMd1fGNGnvYKtilon2UMBP4rqRAowDQYJKoZIhvcNAQEL\nBQAwDzENMAsGA1UEAwwETVlDQTAeFw0yMzA5MjYxODMxMzVaFw0zMzA5MjMxODMx\nMzVaMBYxFDASBgNVBAMMC2NlcnRfc2FtcGxlMIIBIjANBgkqhkiG9w0BAQEFAAOC\nAQ8AMIIBCgKCAQEAzMDsp1EGFPjus/xnHmacPJYVP0N8iQMb3W8TFFQC5jxdjNzi\ncMIb1YgpI+s3LJoyYCdZKeMcCWDwtgQXMTy9FYJCHKyt86CF0br9U9q9iC+NX93X\n+/wrWtXY89ESt0NOgj22sKI49EQT9bd0dNWupxapCb98Dyztk0cetIHa7ia1q7un\nXMZ7dofwuWUEUlT8qpyXF84N6bhWQSrXRyeQ+oZrsq3sAyfnKzbfcs0T3sztWn9M\nR7h8iPkjpJjVV5z1ghAgIDKFXG8RVU8fLgX5srtYV2Ij1II0qYw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jsWUXqay2QwIln+E+xxsm\n-----END RSA PRIVATE KEY-----\n" }In some cases, issues have been reported with certificates that contain \r\n in the PEM format. According to the X509 certificate standard, it is acceptable andNSX Managerallows these certificates to be used and in many cases there are no error results.
- From your browser, log in with admin privileges to anNSX Managerat https://<nsx-manager-ip-address>.
- With admin privileges, log in toNSX Manager.
- Select .
- Select and enter the certificate details.OptionDescriptionNameAssign a name to the certificate.Service CertificateSet toYesto use this certificate for services such as a load balancer and VPN. Set toNoif this certificate is for theNSX Managernodes.Certificate ContentsBrowse to the certificate file on your computer and add the file. The certificate must not be encrypted. If it is a CA-signed certificate, be sure to include the whole chain in this order: certificate - intermediate - root. Everything must be provided in a single line.Private KeyBrowse to the private key file on your computer and add the file. Private key is an optional field if imported certificate is based onNSX Managergenerated CSR, as a private key exists on theNSX Managerappliance.PassphraseIn this release, this field is not used.DescriptionEnter a description of what is included in this certificate.
- ClickImport.