{"id":1293,"date":"2023-11-29T10:59:19","date_gmt":"2023-11-29T09:59:19","guid":{"rendered":"https:\/\/ndk.sytes.net\/wordpress\/?p=1293"},"modified":"2023-11-29T10:59:19","modified_gmt":"2023-11-29T09:59:19","slug":"convert-a-pfx-certificate-to-crt-and-key-files","status":"publish","type":"post","link":"https:\/\/ndk.sytes.net\/wordpress\/?p=1293","title":{"rendered":"Convert a pfx certificate to crt and key files"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Extract the key and decrypt it:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">openssl pkcs12 -in cert.pfx -nocerts -out cert-encrypted.key\nopenssl rsa -in cert-encrypted.key -out cert.key<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">extract the certificate:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">openssl pkcs12 -in cert.pfx -clcerts -nokeys -out cert.crt<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">extract the bundle:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">openssl pkcs12 -in cert.pfx -nokeys -nodes -cacerts -out ca-bundle.crt<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Extract the key and decrypt it: openssl pkcs12 -in cert.pfx -nocerts -out cert-encrypted.key openssl rsa -in cert-encrypted.key -out cert.key extract the certificate: openssl pkcs12 -in cert.pfx -clcerts -nokeys -out cert.crt extract the bundle: openssl pkcs12 -in cert.pfx -nokeys -nodes -cacerts -out ca-bundle.crt<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,7],"tags":[],"class_list":["post-1293","post","type-post","status-publish","format-standard","hentry","category-programming","category-servers"],"_links":{"self":[{"href":"https:\/\/ndk.sytes.net\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1293","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ndk.sytes.net\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ndk.sytes.net\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ndk.sytes.net\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ndk.sytes.net\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1293"}],"version-history":[{"count":1,"href":"https:\/\/ndk.sytes.net\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1293\/revisions"}],"predecessor-version":[{"id":1294,"href":"https:\/\/ndk.sytes.net\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1293\/revisions\/1294"}],"wp:attachment":[{"href":"https:\/\/ndk.sytes.net\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1293"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ndk.sytes.net\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1293"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ndk.sytes.net\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1293"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}