Difference between revisions of "Working with SSL"

From Opentaps Wiki
Jump to navigationJump to search
(New page: === Converting PEM to JKS Private Key === * key.pem is the private SSL key * cert.pem is the certificate for the SSL key <pre> $ openssl pkcs8 -topk8 -nocrypt -in key.pem -inform PEM -out...)
 
m (Protected "Working with SSL": Sysop page [edit=sysop:move=sysop])
(No difference)

Revision as of 18:31, 20 April 2009

Converting PEM to JKS Private Key

  • key.pem is the private SSL key
  • cert.pem is the certificate for the SSL key
$ openssl pkcs8 -topk8 -nocrypt -in key.pem -inform PEM -out key.der -outform DER

$ openssl x509 -in cert.pem -inform PEM -out cert.der -outform DER

$ javac ImportKey.java

$ java ImportKey key.der cert.der
Using keystore-file : /home/user/keystore.ImportKey
One certificate, no chain.
Key and certificate stored.
Alias:importkey  Password:importkey

$ keytool -keystore keystore.ImportKey -storepass
Enter keystore password:
New keystore password:
Re-enter new keystore password: