<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-ligatures:standardcontextual;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal">Howdy,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I am trying to import a PFX/P12 certificate to the local machine certificate store and there’s no errors, but it also doesn’t seem to work either.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I’ve left a bit of debugging code in the script to show all the things I’ve tried, but again there’s no errors, and it generates the PyStore object like the docs say it will and I enumerate the certificates in the store with a for loop,
BUT it doesn’t seem to add the PFX to the store (or at least I can’t see it in the Certificates MMC app for the local machine).<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I can manually import the PFX by using the CryptoAPI “Install PFX†option from the windows explorer shell just fine, but the win32crypt.PFXImportCertStore() call doesn’t error, but it also enumerates the machine store certs without the
“newly added†PFX.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"># this is output from the script in the for loop at the bottom from the attached python script – these 2 certificates existed prior to the PFX trying to get imported<o:p></o:p></p>
<p class="MsoNormal">1 Cert: <PyCERT_CONTEXT object at 0x000001D0103736B0><o:p></o:p></p>
<p class="MsoNormal">2 CertEnumCertificateContextProperties returned: []<o:p></o:p></p>
<p class="MsoNormal">3 cert.Subject: w22test001.manross.net<o:p></o:p></p>
<p class="MsoNormal">4 cert Serial Number: redacted<o:p></o:p></p>
<p class="MsoNormal">5 Issuer: redacted<o:p></o:p></p>
<p class="MsoNormal">6 NotBefore: redacted<o:p></o:p></p>
<p class="MsoNormal">7 NotAfter: redacted<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">1 Cert: <PyCERT_CONTEXT object at 0x000001D010373920><o:p></o:p></p>
<p class="MsoNormal">2 CertEnumCertificateContextProperties returned: [2, 11]<o:p></o:p></p>
<p class="MsoNormal">3 cert.Subject: w22test001.manross.net<o:p></o:p></p>
<p class="MsoNormal">4 cert Serial Number: redacted<o:p></o:p></p>
<p class="MsoNormal">5 Issuer: redacted<o:p></o:p></p>
<p class="MsoNormal">6 NotBefore: redacted<o:p></o:p></p>
<p class="MsoNormal">7 NotAfter: redacted<o:p></o:p></p>
<p class="MsoNormal"><br>
Please and thank you,<o:p></o:p></p>
<p class="MsoNormal">Steven<o:p></o:p></p>
</div>
</body>
</html>