{"id":2434,"date":"2023-03-30T19:31:39","date_gmt":"2023-03-30T17:31:39","guid":{"rendered":"https:\/\/labalec.fr\/erwan\/?p=2434"},"modified":"2023-03-30T19:31:39","modified_gmt":"2023-03-30T17:31:39","slug":"export-a-certificate-along-its-non-exportable-key-the-easy-way","status":"publish","type":"post","link":"https:\/\/labalec.fr\/erwan\/?p=2434","title":{"rendered":"Export a certificate along its non exportable key &#8211; the easy way"},"content":{"rendered":"\n<p>In a previous article (<a rel=\"noreferrer noopener\" href=\"https:\/\/labalec.fr\/erwan\/?p=2413\" data-type=\"URL\" data-id=\"https:\/\/labalec.fr\/erwan\/?p=2413\" target=\"_blank\">here<\/a>), we have seen how to export a certificate and its non exportable key using a rather complex method (decrypting DPAPI).<\/p>\n\n\n\n<p>Here below how to do it the easy way (by hooking a rsaenh.dll api) :<\/p>\n\n\n\n<p><em>cert &#8211;export &#8211;store=root &#8211;subject=\u00a0\u00bbRoot Authority\u00a0\u00bb &#8211;force<\/em><\/p>\n\n\n\n<p>-> you get a cert.pfx containing both the certificate and the private key.<\/p>\n\n\n\n<p>Import and enjoy !<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In a previous article (here), we have seen how to export a certificate and its non exportable key using a rather complex method (decrypting DPAPI). Here below how to do it the easy way (by hooking a rsaenh.dll api) : cert &#8211;export &#8211;store=root &#8211;subject=\u00a0\u00bbRoot Authority\u00a0\u00bb &#8211;force -> you get a cert.pfx containing both the certificate <a href='https:\/\/labalec.fr\/erwan\/?p=2434' class='excerpt-more'>[&#8230;]<\/a><\/p>\n","protected":false},"author":7,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[132,135,129],"tags":[],"class_list":["post-2434","post","type-post","status-publish","format-standard","hentry","category-openssl","category-rsa","category-ssl","category-132-id","category-135-id","category-129-id","post-seq-1","post-parity-odd","meta-position-corners","fix"],"_links":{"self":[{"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=\/wp\/v2\/posts\/2434","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2434"}],"version-history":[{"count":1,"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=\/wp\/v2\/posts\/2434\/revisions"}],"predecessor-version":[{"id":2435,"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=\/wp\/v2\/posts\/2434\/revisions\/2435"}],"wp:attachment":[{"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2434"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2434"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2434"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}