Requesting a Certificate from a Certificate Authority
To encrypt HTTPS REST API with a certificate that browsers implicitly trust, request a signed certificate from a trusted Certificate Authority (or CA) such as Verisign as follows:
- Create a Certificate Signing Request (csr)
- Forward the
.csr
file to a Certificate Authority (CA). They will issue you a signed (browser-trusted) certificate for your server. Request the certificate be issued in PKCS12 format.Important: If you want to specify both the certificate and the private key files in the REST API HTTPS configuration, skip the following steps and see REST API HTTPS Settings. - After you have received the PKCS12 formatted file, DO NOT import it to any Microsoft default certificate handling facilities.
- Via openssl, perform the following on each PKCS12 formatted file to export to a password stripped PEM file format:
This exports the PKCS12 file to a PEM formatted file with both the public key and private certificate without any passwords.openssl pkcs12 -in PKCS12.p12 -out PEM_CERT_FILE_NAME.pem -nodes -clcerts
- Open the PEM certificate file with WordPad.
- Leave only the public key and private certificate, keeping the
BEGIN
andEND
block stanza headers. This is an example:-----BEGIN CERTIFICATE----- MIICYjCCAcugAwIBAgIJANiRLK2nbg9oMA0GCSqGSIb3DQEBBQUAMEoxCzAJBgNV BAYTAlVTMRMwEQYDVQQIDApDYWxpZm9ybmlhMRMwEQYDVQQHDApFbWVyeXZpbGxl MREwDwYDVQQDDAhIRUlNREFMTDAeFw0xMjAzMTUwMjA5MzdaFw0xMzAzMTUwMjA5 MzdaMEoxCzAJBgNVBAYTAlVTMRMwEQYDVQQIDApDYWxpZm9ybmlhMRMwEQYDVQQH DApFbWVyeXZpbGxlMREwDwYDVQQDDAhIRUlNREFMTDCBnzANBgkqhkiG9w0BAQEF AAOBjQAwgYkCgYEA5h5aCcN5Up5rNYn7a88dKAehe7CbKDtPF6jdrn52yShJc97f mceJeIsnkVmBVRoIBevxFnNIKxMzzR52c0NKK2gU0ax2k6TWD8yVOHHFepBgcCyF JD9y9g5u444+7S5vsXRpmAx7z3HYHHh9Jjiv7zLoN46Mu+7KpnZnJgFX0QcCAwEA AaNQME4wHQYDVR0OBBYEFHJXtkgif6mZzQBcrp7U7yptf/WzMB8GA1UdIwQYMBaA FHJXtkgif6mZ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zA3FiCNq+gHFkBc6Kr4FxfNWCm aoyVGYxl1LT+VHJA -----END PRIVATE KEY-----
- Save the modified PEM file containing only the public certificate and private key.
- Store this file on your BigFix server and refer to it when setting up your REST API.