Portál AbcLinuxu, 12. května 2025 05:22
BE CAREFUL, THERE'S A TRAP: Most common webbrowsers like Mozilla or Netscape can't cope with this certificate type. In the former sections we created certificates in PEM format. But those browsers need the certificate to be in another type, like PKCS#12. Therefore we do a conversion: d) Convert user certificate and import it in your browser # openssl pkcs12 -export -clcerts -in garex.CRT -inkey garex.KEY -out garex.P12 During the conversion dialog you will be asked for an export password; enter anything you can remember, but don't let it be empty. What you get now is a file which not only keeps the certificate, but also your private Key. Copy this file to your workstation (Windows/Linux/Mac OS X), start Mozilla and go through the browsers menu structure like Preferences -> Privacy & Security -> Manage Certificates -> Your Certificates -> Import -> Choose file Now enter your formerly chosen export password, then the passphrase of your previously generated private key, which is contained in the P12 file. Finished! But still there's a catch: the browser does not know anything about the CA which created and signed your new user certificate. To complete this task we have to import the root CA certificate as well. This is very easy, although it took me 2h to find out how to do with Mozilla :). Just put the garexCA.CRT on a public http port 80 webserver, enter the URL in your browser and click on the garexCA.CRT. http://www.garex.net/garexCA.CRT and - what a surprise - the browser recognizes this certifiacte as a new root CA certificate and offers you to import this certificate to your root CA chain. :)) Internet Explorer, the thing from a different world Once again Microsoft's Internet Explorer has its own standards: it only accepts certificates of the type DER. Therefore we have to convert our user certificate and the root CA certificate: # openssl x509 -inform PEM -in garex.CRT -outform DER -out garex.CRT.der # openssl x509 -inform PEM -in garexCA.CRT -outform DER -out garexCA.CRT.der Import these two certificates via IE and you are finished.
Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.