Openssl 为什么存储中的证书未在outlook中列出以进行签名和加密?

Openssl 为什么存储中的证书未在outlook中列出以进行签名和加密?,openssl,cryptography,Openssl,Cryptography,如果证书从.pfx文件导入到个人存储中,它将在outlook中列出以进行签名和加密 而如果使用函数PFXImportCertStore()导入此.pfx文件;然后使用以下函数添加到证书存储中: // // Open the certificate store to add certificates to store // hUsrCertStore = CertOpenSystemStore( NULL,

如果证书从.pfx文件导入到个人存储中,它将在outlook中列出以进行签名和加密

而如果使用函数PFXImportCertStore()导入此.pfx文件;然后使用以下函数添加到证书存储中:

        //
        // Open the certificate store to add certificates to store
        //
        hUsrCertStore = CertOpenSystemStore(
            NULL,
            L"MY" );
        if ( ! hUsrCertStore )
        {
            hResult =  GetLastError( );
            __leave;
        } // if

        //
        // Add the created certificate into system certificate store
        //
        if ( ! CertAddCertificateContextToStore(
            hUsrCertStore,
            pUsrSignCertContext,
            CERT_STORE_ADD_REPLACE_EXISTING,
            0 ) )
        {
            hResult = GetLastError( );
            __leave;
        } // if
如果以编程方式添加,则不会在outlook中列出它。
pfx文件出现这种行为的原因是什么

是否在添加证书后关闭存储?是的,在添加证书后关闭存储,并尝试不关闭存储