Convert and Import a Grid Certificate to PKCS12 Format
Some authentication scripts create certificates in an ASCII, PEM format (denoted by the .pem file suffix). However, most web browsers, including Internet Explorer and Firefox, require that certificates be provided in a binary, PKCS12 format (with a .p12 file suffix) before they can be imported. Note that this conversion requires a matching pair of certificate and key files in PEM format.
Converting a PEM certificate to PKCS12 (.P12) format
To convert a PEM certificate to a format that your browser will accept:
-
Enter the following
opensslcommand from within the directory containing your PEM certificate and key files:openssl pkcs12 -export -in usercert.pem -inkey userkey.pem -out \ usercert.p12 -name "[a descriptive name for your certificate]"
- When prompted for a password for the file userkey.pem, enter your main grid certificate password.
- When prompted for a new password for the new .P12 file, you can choose to enter the same password as before, or to create a new password. In either case, take note of this password, as it will be needed in order to import the new .P12 certificate into your browser.
- Finally, in order to protect your new .P12 certificate file, change its access privileges to "read/write only by owner" with the command:
chmod 600 usercert.p12
Importing the certificate into your browser
To import the .P12 certificate:
- View your installed certificate:
- In Firefox v2 (Linux): Click Edit -> Preferences, click Advanced, click the Encryption tab, and then click View Certificates.
- In Firefox v2 (Windows): Click Tools -> Options, click Advanced, click Encryption, and then click View Certificates.
- In Firefox v1.5 (Linux): Click Edit -> Preferences, click Advanced, click Security, and then click View Certificates.
- In Firefox v1.5 (Windows): Click Tools -> Options, click Advanced, click Security, and then click View Certificates.
- In Mozilla v1.7 or Seamonkey v1 (Linux): Click Edit -> Preferences, expand Privacy & Security, click Certificates, and then click Manage Certificates.
- In Internet Explorer v7: Click Tools -> Internet Options, click the Content tab, and under Certificates, click the Certificates button.
- In Internet Explorer v6: Click Tools -> Internet Options, click the Content tab, and under Certificates, click Personal.
- Click Import, browse to your local .P12 certificate file, and enter your certificate pass phrase when prompted.
