Explore my side projects and work using this link

“Death is so terribly final, while life is full of possibilities”

― George R.R. Martin, A Game of Thrones

Karena kerja sebagai security analyst, udah jadi agenda tahunan saya untuk update SSL certificate seluruh aplikasi kantor. Certificate yang didapat dari penyedia sebenernya bisa ke semua format yang ada, kecuali PKCS#12/PFX karena mereka ngga punya file key nya. Sebagai pengingat juga untuk saya di tahun depan, ini dia cara convert file certs menjadi PKCS#12/PFX:

openssl pkcs12 -export -out domain.com.pfx -inkey domain.com.privateKey.key -in domain.com.crt -certfile Intermediate-CA.crt -certfile TrustedRoot.crt

Sedangkan untuk verifikasi bahwa csr, key, dan crt yang kita punya itu match, commands nya begini:

openssl pkey -in domain.com.key -pubout -outform pem | sha256sum
openssl x509 -in domain.com.crt -pubkey -noout -outform pem | sha256sum
openssl req -in domain.com.csr -pubkey -noout -outform pem | sha256sum

Tags

Leave a Reply

Your email address will not be published. Required fields are marked *