Skip to main content

Posts

Showing posts from March, 2018

Macam2 cerita pasal OPENSSL

USEFUL OPENSSL ONE-LINERS As a follow up for the certificate authority posting, here are some (hopefully) useful openssl one-liners: # creating a key openssl genrsa -aes256 -out user.key 4096 # creating a certificate signing request openssl req -sha256 -new -key user.key -out user.csr # signing the certificate signing request with a certificate authority openssl ca -config ca.config -out user.crt -infiles user.csr # creating a self sigend certificate openssl req -sha256 -new -x509 -key user.key -out user.crt # verify if the ca.crt has really signed user.crt openssl verify -CAfile ca.crt user.crt # decrypting the key openssl rsa -in user.key -out user.key.decrypted # creating a pkcs#7 format certificate in DER format openssl crl2pkcs7 -nocrl -certfile user.crt -certfile ca.crt -outform DER -out user.p7c # creating a pkcs#12 format certificate (IIS) openssl pkcs12 -export -in user.crt -inkey user.key -out server.pkcs12 # checking the data of a key openssl rsa -noout...