Requesting for and Installing a Digital Certificates on Your Router
A digital certificate is an electronic means for verifying your identity through a trusted third party, known as a certificate authority (CA). Alternatively, you can use a self-signed certificate to attest to your identity. The CA server you use can be owned and operated by an independent CA or by your own organization, in which case you become your own CA. If you use an independent CA, you must contact them for the addresses of their CA and certificate revocation list (CRL) servers (for obtaining certificates and CRLs) and for the information they require when submitting personal certificate requests. When you are your own CA, you determine this information yourself. The Public Key Infrastructure (PKI) provides an infrastructure for digital certificate management.
Requesting a Digital Certificate—Manual Process
To obtain digital certificates manually, you must configure a CA profile, generate a private-public key pair, create a local certificate, and load the certificates on the router. After loading the certificates, they can be referenced in your IPsec-VPN configuration.
This procedure shows how you can configure a CA profile:
- Configure a CA profile:user@R2# set security pki ca-profile entrust ca-identity entrust enrollment url http://ca-1.jnpr.net/cgi-bin/pkiclient.exe
After you commit this configuration. The configuration on Router 2 must contain the following:
[edit]security {pki {ca-profile entrust {ca-identity entrust;enrollment {url http://ca-1.jnpr.net/cgi-bin/pkiclient.exe;}}}} - Certificate revocation list (CRL) verification is enabled
by default. You can optionally specify the Lightweight Access Directory
(LDAP) server where the CA stores the CRL. The certificate typically
includes a certificate distribution point (CDP), which contains information
about how to retrieve the CRL for the certificate. The router uses
this information to download the CRL automatically. In this example,
the LDAP URL is specified, which overrides the location provided in
the certificate:user@R2# set security pki ca-profile entrust revocation-check crl url ldap://10.157.90.185/o=juniper,c=uscertificateRevocationListbase
After you commit this configuration. The configuration on Router 2 must contain the following:
[edit]security pki ca-profile entrust {revocation-check {crl {url ldap://10.157.90.185/o=juniper,c=uscertificateRevocationListbase;}}} - After you configure the CA profile, request a CA certificate
from the trusted CA. In this example, the certificate is enrolled
online and installed into the router automatically.
user@R2> request security pki ca-certificate enroll ca-profile entrustReceived following certificates: Certificate: C=us, O=juniper Fingerprint: 00:8e:6f:58:dd:68:bf:25:0a:e3:f9:17:70:d6:61:f3:53:a7:79:10 Certificate: C=us, O=juniper, CN=First Officer Fingerprint: bc:78:87:9b:a7:91:13:20:71:db:ac:b5:56:71:42:ad:1a:b6:46:17 Certificate: C=us, O=juniper, CN=First Officer Fingerprint: 46:71:15:34:f0:a6:41:76:65:81:33:4f:68:47:c4:df:78:b8:e3:3f Do you want to load the above CA certificate ? [yes,no] (no) yes
Note: If you obtain the CA certificate directly from the CA (for example, as an e-mail attachment or website download), you can install it with the request security pki ca-certificate load command.
- Next, you must generate a private-public key pair before
you can create a local certificate.
user@R2> request security pki generate-key-pair certificate-id local-entrust2Generated key pair local-entrust2, key size 1024 bits
When the key pair is available, generate a local certificate request and send it to the CA for processing.
user@R2> request security pki generate-certificate-requestcertificate-id local-entrust2 domain-name router2.juniper.net filename entrust-req2 subject cn=router2.juniper.net Generated certificate request -----BEGIN CERTIFICATE REQUEST----- MIIBoTCCAQoCAQAwGjEYMBYGA1UEAxMPdHAxLmp1bmlwZXIubmV0MIGfMA0GCSqG SIb3DQEBAQUAA4GNADCBiQKBgQCiUFklQws1Ud+AqN5DDxRs2kVyKEhh9qoVFnz+ Hz4c9vsy3B8ElwTJlkmIt2cB3yifB6zePd+6WYpf57Crwre7YqPkiXM31F6z3YjX H+1BPNbCxNWYvyrnSyVYDbFj8o0Xyqog8ACDfVL2JBWrPNBYy7imq/K9soDBbAs6 5hZqqwIDAQABoEcwRQYJKoZIhvcNAQkOMTgwNjAOBgNVHQ8BAf8EBAMCB4AwJAYD VR0RAQH/BBowGIIWdHAxLmVuZ2xhYi5qdW5pcGVyLm5ldDANBgkqhkiG9w0BAQQF AAOBgQBc2rq1v5SOQXH7LCb/FdqAL8ZM6GoaN5d6cGwq4bB6a7UQFgtoH406gQ3G 3iH0Zfz4xMIBpJYuGd1dkqgvcDoH3AgTsLkfn7Wi3x5H2qeQVs9bvL4P5nvEZLND EIMUHwteolZCiZ70fO9Fer9cXWHSQs1UtXtgPqQJy2xIeImLgw== -----END CERTIFICATE REQUEST----- Fingerprint: 0d:90:b8:d2:56:74:fc:84:59:62:b9:78:71:9c:e4:9c:54:ba:16:97 (sha1) 1b:08:d4:f7:90:f1:c4:39:08:c9:de:76:00:86:62:b8 (md5)

Note: You can request the creation and installation of a local certificate online with the request security pki local-certificate enroll command.
- The trusted CA digitally signs the local certificate and
returns it to you. Copy the certificate file into the router and load
the certificate.
user@R2> request security pki local-certificate load filename /tmp/router2-cert certificate-id local-entrust2Local certificate local-entrust2 loaded successfully

Note: The name of the file sent to you by the CA might not match the name of the certificate identifier. However, the certificate-id name must always match the name of the key pair you generated for the router.