Convert SSL certificate dạng .pfx sang định dạng .crt/key dùng cho NGINX

Posted by huylvt on July 31, 2018
  • Private key
openssl pkcs12 -in star_domain_com.pfx -nocerts -nodes | openssl rsa -out star_domain_com_nopass.key
  • Certificate
openssl pkcs12 -in star_domain_com.pfx -clcerts -nokeys -out star_domain_com_chained.crt
  • CA
openssl pkcs12 -in star_domain_com.pfx -cacerts -nokeys -chain -out star_domain_com_trusted.crt