Create Key file
openssl genrsa -des3 -out mg.key 2048
Create CSR with above keyfile
openssl req -new -sha256 -key ./cert.key -out ./cert.csr
Fill in the questions regarding the csr
Send the CSR to the company that issue certificates
When you get the certificate back from the cert company you do this
Create a all.crt file with cert,intermediate,root certificate
cert
intermediate
root cert
—–BEGIN CERTIFICATE—–
MIIDxTCCAq2gAwIBAgIQAqxcJmoLQJuPC3nyrkYldzANBgkqhkiG9w0BAQUFADBs
MQswCQYDVQQGEwJVUzEVMBMGA…….
—–END CERTIFICATE—–
—–BEGIN CERTIFICATE—–
MIIEsTCCA5mgAwIBAgIQBOHnpNxc8vNtwCtCuF0VnzANBgkqhkiG9w0BAQsFADBs
MQswCQYDVQQGEwJVUzEVMBMGA1UE…..
—–END CERTIFICATMIIG7zCCBdegAwIBAgIQDUbTtguiVpI11tAAw4bOKjANBgkqhkiG9w0BAQsFADBw……
—–END CERTIFICATE—–
Now we have a crt file with the certifcate and full chain.
Create PKCS12 with the private key
openssl pkcs12 -export -out onegate.p12 -inkey onegate.key -in all.crt
enter password and export password
Verify the p12 certificate
openssl pkcs12 -info -in onegate.p12
Done!
Leave a Reply