{"id":1830,"date":"2013-01-24T16:48:42","date_gmt":"2013-01-24T08:48:42","guid":{"rendered":"http:\/\/rmohan.com\/?p=1830"},"modified":"2013-01-24T16:52:06","modified_gmt":"2013-01-24T08:52:06","slug":"openssl-howto-for-apache","status":"publish","type":"post","link":"https:\/\/mohan.sg\/?p=1830","title":{"rendered":"Openssl Howto for Apache"},"content":{"rendered":"<p>&nbsp;<\/p>\n<h4>Display Certificate Subject name in readable format<\/h4>\n<p><b>openssl x509 -in CERTIFICATE_FILE -noout -subject -nameopt multiline,-lname,-align<\/b><\/p>\n<p><a href=\"http:\/\/www.fixyourip.com\/library\/openssl\/openssl_howto.php#top\">Top<\/a><\/p>\n<p><a name=\"verify\"><\/a><\/p>\n<h4>To verify a certificate chain<\/h4>\n<p><b>openssl verify CERTIFICATE_FILE<\/b><\/p>\n<p>&nbsp;<\/p>\n<p>The file CERTIFICATE_FILE contain the intermediate certificate first and the servers certificate.<\/p>\n<p>Check your Certificate using the Certificate Check tool at the bottom of the page<\/p>\n<p><a href=\"http:\/\/www.fixyourip.com\/library\/openssl\/openssl_howto.php#top\">Top<\/a><\/p>\n<p><a name=\"viewpkcs12\"><\/a><\/p>\n<h4>To view a PKCS#12 file using openssl command<\/h4>\n<p><b>openssl pkcs12 -in CertName.p12<\/b><\/p>\n<p>A PKCS#14 file contains the certificate, private key and all the intermediate certificate&#8217;s in a certificate chain and is encrypted with a password.<\/p>\n<p>Alternatively use PKCS12 view <a href=\"http:\/\/www.fixyourip.com\/tools\/ssltools.php\">Tool<\/a><\/p>\n<p><a href=\"http:\/\/www.fixyourip.com\/library\/openssl\/openssl_howto.php#top\">Top<\/a><\/p>\n<p><a name=\"convertpkcs12\"><\/a><\/p>\n<h4>Convert PKCS#12 file to pem format using openssl command<\/h4>\n<p><b>openssl x509 -inform der -in certname.p12 -out convertedfile<\/b><\/p>\n<p><a href=\"http:\/\/www.fixyourip.com\/library\/openssl\/openssl_howto.php#top\">Top<\/a><\/p>\n<p><a name=\"viewpkcs7\"><\/a><\/p>\n<h4>To view PKCS#7 files using openssl command<\/h4>\n<p>The PKCS #7 format enables the transfer of a certificate and all the certificates in its certification path from one computer to another, or from a computer to removable media. PKCS #7 files typically use the .p7b extension, and are compatible with the ITU-T X.509 standard<\/p>\n<p><b>openssl pkcs7 -in filename_containing_cert -print_certs -out cert.pem<\/b><\/p>\n<p><a href=\"http:\/\/www.fixyourip.com\/library\/openssl\/openssl_howto.php#top\">Top<\/a><\/p>\n<p><a name=\"convertpkcs7toder\"><\/a><\/p>\n<h4>Convert a PKCS#7 file from PEM to DER using openssl command<\/h4>\n<p>command: openssl pkcs7 -in filename_containing_cert -outform DER -out file.der<\/p>\n<p><a href=\"http:\/\/www.fixyourip.com\/library\/openssl\/openssl_howto.php#top\">Top<\/a><\/p>\n<p><a name=\"convertdertopem\"><\/a><\/p>\n<h4>Convert a DER formatted certificate to PEM using openssl command<\/h4>\n<p><b>openssl x509 -inform der -in certificate_file -outform pem -out newfilename.pem <\/b><\/p>\n<p><b>To view the Der formatted file (*.crt, *.cer, *.der)<\/b><br \/> <b>openssl x509 -inform der -in certificate_file -text<\/b> <a href=\"http:\/\/www.fixyourip.com\/library\/openssl\/openssl_howto.php#top\">Top<\/a><\/p>\n<p><a name=\"thumbprint\"><\/a><\/p>\n<h4>Display Certificate Thumbprint<\/h4>\n<p>To display certificate thumbprint using open source software namely openssl<\/p>\n<p>1. <b>openssl x509 -in CERTIFICATE_FILE -noout -sha1 -fingerprint<\/b><br \/> 2. <b>openssl x509 -in CERTIFICATE_FILE -noout -fingerprint<\/b><\/p>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp;<\/p>\n<p> Display Certificate Subject name in readable format <\/p>\n<p>openssl x509 -in CERTIFICATE_FILE -noout -subject -nameopt multiline,-lname,-align<\/p>\n<p>Top<\/p>\n<\/p>\n<p> To verify a certificate chain <\/p>\n<p>openssl verify CERTIFICATE_FILE<\/p>\n<p>&nbsp;<\/p>\n<p>The file CERTIFICATE_FILE contain the intermediate certificate first and the servers certificate.<\/p>\n<p>Check your Certificate using the Certificate Check tool at the bottom of the page<\/p>\n<p>Top<\/p>\n<\/p>\n<p> [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[],"_links":{"self":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/1830"}],"collection":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1830"}],"version-history":[{"count":3,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/1830\/revisions"}],"predecessor-version":[{"id":1833,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/1830\/revisions\/1833"}],"wp:attachment":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1830"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1830"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1830"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}