Category Archives: OpenSSL

Generate a new pkcs12 ( p12 or pfx) from your public and private key

Start Openssl. Normally in “C:\Program Files (x86)\GnuWin32\bin” Execute openssl>pkcs12 –export –in MyCertificate.crt –inkey MyKey.key –out MyNewCert.pfx

Posted in OpenSSL | Tagged , | Comments Off on Generate a new pkcs12 ( p12 or pfx) from your public and private key

Write CSR with SAN-attributes

Openssl.cnf[ req] distinguished_name = req_distinguished_name req_extensions = v3_req [req_distinguished_name] countryName = Country Name (2 letter code) countryName_default = US stateOrProvinceName = State or Province Name (full name) stateOrProvinceName_default = MyProvince localityName = Locality Name (eg, city) localityName_default = Mycity 0.organizationName … Continue reading

Posted in OpenSSL, PKI | Tagged , , | Comments Off on Write CSR with SAN-attributes

Verify certificate and private key with Openssl

Openssl can be used for verifying if there is a match between a private key and certificate. Enter these commands and analyze the output. openssl x509 -noout -text -in server.crt openssl rsa -noout -text -in server.key Compare the two sections … Continue reading

Posted in OpenSSL, PKI | Comments Off on Verify certificate and private key with Openssl

OpenSSL Error Codes

TXT_DB error number 2 This thing happens when you try to sign a certificate that shares the same common data as another certificate. You cannot have two certificates that look the same. Soloution: Either remove them by hand from the database, … Continue reading

Posted in OpenSSL, PKI | Comments Off on OpenSSL Error Codes