Exporting your public key in DER or Base64 format

Goal

The procedure to map a non-CERN certificate to your CERN account requires your public key in a DER or Base64 format.

We assume that the certificate is already installed in Internet Explorer, Mozilla Firefox, or availabe as a file for OpenSSL command line.

With Internet Explorer

  • Open Internet Explorer
  • Menu Tools -> Internet Options
  • Tab Content -> Click Certificates
  • Select the Certificate you want to export the Public Key from and click Export
  • Click Next -> Check No do not export the private key -> Click Next
  • Select DER encoded binary X.509 (.CER) -> Click Next
  • Type in a filename with a .cer extension to save this public key to -> Click Next
  • Click finish -> Click Ok

The file with the .cer extension your just created can now be used to map the certificate to your CERN account.

With Mozilla Firefox

The instructions below refer to Firefox v. 18.0.2. If you are using another version of Firefox, the procedure may differ.

  • Open Mozilla Firefox.
  • In the main menu click Tools->Options.
  • From the Options dialog select Advanced->Encryption->View Certificates.
  • From the "Certificate Manager" window, select the "Your Certificates" tab, then select the certificate you want to export and click the Backup button.
  • Choose the folder where you want the certificate to be saved and the certificate file name, making sure it ends with '.p12', such as 'myCert.p12', then click "Save".
  • Enter a password for the certificate backup and click "Ok".
  • Now we need to run an OpenSSL command to extract the public key from the PCKS12 file:
    openssl pkcs12 -in myCert.p12 -out myPublicKey.pem -clcerts -nokeys
  • Delete the .p12 file to avoid security issues.

The file myPublicKey.pem you just created can now be used to map the selected certificate to your CERN Account.

With OpenSSL

  • Assuming your certificate if stored in a PCKS12 file myCert.p12:
    openssl pkcs12 -in myCert.p12 -out myPublicKey.pem -clcerts -nokeys

The file myPublicKey.pem you just created can now be used to map the selected certificate to your CERN Account.

Created: 3/10/2020
Last reviewed: 5/2/2022
Tools:
Send the page Send  |  Printable version Print