You can do this.. to create private key and the certificate
makecert.exe -sv a.pvk –n “CN=XXXX”a.cer //其中XXXX是用于CertFindCertificateInStore函数 And you can make *.spc file like this. cert2spc.exe a.cer a.spc Finally, you can make *.pfx file like this pvk2pfx -pvk a.pvk -spc a.spc //然后选导出私钥 makecert.exe just creates the 'test purpose' certificates, so you better install the 'Certificate server' on your Window2k or 2003 server, and enroll your own certificate.