[req] distinguished_name = req_distinguished_name req_extensions = req_ext [req_distinguished_name] countryName = Country Name (2 letter code) stateProvinceName = State or Province Name ( full name) localityName = Locality Name ( eg city) organizationalUnitName = Organizational Unit Name ( eg. section) commonName = Common Name (eg. your server hostname) organizationName = organizationName [req_ext] subjectAltName = @alt_names [alt_names] DNS.1 = www.example.com DNS.2 = example.com DNS.3 = api.example.com
openssl req -new -newkey rsa:2048 -nodes -keyout abc.com.key -out abc.com.csr -config san.cnf
openssl pkcs12 -export -out cert.pfx -inkey your.key -in your.cer
cat certificate.cer intermediate1.cer intermediate2.cer root.cer > bundle.crt
openssl pkcs12 -export -out bundle.pfx -inkey private.key -in certificate.cer -certfile bundle.crt