70 references to CAPISafe
System.Security (70)
system\security\cryptography\cryptoapi.cs (13)
2326bool result = CAPISafe.CryptDecodeObject(X509_ASN_ENCODING | PKCS_7_ASN_ENCODING, 2337result = CAPISafe.CryptDecodeObject(X509_ASN_ENCODING | PKCS_7_ASN_ENCODING, 2367if (!CAPISafe.CryptDecodeObject(X509_ASN_ENCODING | PKCS_7_ASN_ENCODING, 2377if (!CAPISafe.CryptDecodeObject(X509_ASN_ENCODING | PKCS_7_ASN_ENCODING, 2404if (!CAPISafe.CryptEncodeObject(X509_ASN_ENCODING | PKCS_7_ASN_ENCODING, 2412if (!CAPISafe.CryptEncodeObject(X509_ASN_ENCODING | PKCS_7_ASN_ENCODING, 2438if (!CAPISafe.CryptEncodeObject(X509_ASN_ENCODING | PKCS_7_ASN_ENCODING, 2446if (!CAPISafe.CryptEncodeObject(X509_ASN_ENCODING | PKCS_7_ASN_ENCODING, 2471SafeLocalAllocHandle safeLocalAllocHandle = CAPISafe.LocalAlloc(uFlags, sizetdwBytes); 2554IntPtr pv = CAPISafe.CryptFindOIDInfo(dwKeyType, 2576IntPtr pv = CAPISafe.CryptFindOIDInfo(dwKeyType, 2677return CAPISafe.CertDuplicateCertificateContext(pCertContext); 2699CAPISafe.CertFreeCertificateContext(handle);
system\security\cryptography\dataprotection.cs (6)
106CAPI.CAPISafe.ZeroMemory(blob.pbData, blob.cbData); 107CAPI.CAPISafe.LocalFree(blob.pbData); 169CAPI.CAPISafe.ZeroMemory(userData.pbData, userData.cbData); 170CAPI.CAPISafe.LocalFree(userData.pbData); 202throw new CryptographicException(CAPI.CAPISafe.LsaNtStatusToWinError(status)); 233throw new CryptographicException(CAPI.CAPISafe.LsaNtStatusToWinError(status));
system\security\cryptography\pkcs\envelopedpkcs7.cs (7)
478if (!CAPI.CAPISafe.CryptMsgUpdate(m_safeCryptMsgHandle, encodedContent, (uint) encodedContent.Length, true)) 497safeCryptMsgHandle = CAPI.CAPISafe.CryptMsgOpenToDecode(CAPI.X509_ASN_ENCODING | CAPI.PKCS_7_ASN_ENCODING, 507if (!CAPI.CAPISafe.CryptMsgUpdate(safeCryptMsgHandle, encodedMessage, (uint) encodedMessage.Length, true)) 751if (!CAPI.CAPISafe.CertGetCertificateContextProperty(X509Utils.GetCertContext(certificate), 759if (!CAPI.CAPISafe.CertGetCertificateContextProperty(X509Utils.GetCertContext(certificate), 937if (!CAPI.CAPISafe.CertGetCertificateContextProperty(X509Utils.GetCertContext(certificate), 944if (!CAPI.CAPISafe.CertGetCertificateContextProperty(X509Utils.GetCertContext(certificate),
system\security\cryptography\pkcs\pkcsmisc.cs (3)
323int keyLength = (int) CAPI.CAPISafe.CertGetPublicKeyLength(CAPI.X509_ASN_ENCODING | CAPI.PKCS_7_ASN_ENCODING, pKeyInfo.DangerousGetHandle()); 537SafeCryptMsgHandle safeCryptMsgHandle = CAPI.CAPISafe.CryptMsgOpenToDecode( 547if (!CAPI.CAPISafe.CryptMsgUpdate(safeCryptMsgHandle, encodedMessage, (uint) encodedMessage.Length, true))
system\security\cryptography\pkcs\pkcsutils.cs (24)
42using(SafeLibraryHandle hModule = CAPI.CAPISafe.LoadLibrary("Crypt32.dll")) { 44IntPtr pFunc = CAPI.CAPISafe.GetProcAddress(hModule, "CryptMsgVerifyCountersignatureEncodedEx"); 80while (CAPI.CAPISafe.CryptGetProvParam(safeCryptProvHandle, CAPI.PP_ENUMALGS_EX, pPeex.DangerousGetHandle(), new IntPtr(&cbPeex), enumFlag)) { 97if (!CAPI.CAPISafe.CryptMsgGetParam(safeCryptMsgHandle, 111if (!CAPI.CAPISafe.CryptMsgGetParam(safeCryptMsgHandle, 126if (!CAPI.CAPISafe.CryptMsgGetParam(safeCryptMsgHandle, 135if (!CAPI.CAPISafe.CryptMsgGetParam(safeCryptMsgHandle, 160if (!CAPI.CAPISafe.CryptMsgGetParam(safeCryptMsgHandle, 170if (!CAPI.CAPISafe.CryptMsgGetParam(safeCryptMsgHandle, 190if (!CAPI.CAPISafe.CryptMsgGetParam(safeCryptMsgHandle, 201if (!CAPI.CAPISafe.CryptMsgGetParam(safeCryptMsgHandle, 218if (!CAPI.CAPISafe.CryptMsgGetParam(safeCryptMsgHandle, 231SafeCertContextHandle safeCertContextHandle = CAPI.CAPISafe.CertCreateCertificateContext(CAPI.X509_ASN_ENCODING | CAPI.PKCS_7_ASN_ENCODING, 283if (!CAPI.CAPISafe.CryptMsgGetParam(safeCrytpMsgHandle, 293if (!CAPI.CAPISafe.CryptMsgGetParam(safeCrytpMsgHandle, 303if (!CAPI.CAPISafe.CryptMsgGetParam(safeCrytpMsgHandle, 337if (!CAPI.CAPISafe.CryptMsgGetParam(safeCryptMsgHandle, 349if (!CAPI.CAPISafe.CryptMsgGetParam(safeCryptMsgHandle, 365uint cbSize = CAPI.CAPISafe.CertNameToStrW(CAPI.X509_ASN_ENCODING | CAPI.PKCS_7_ASN_ENCODING, 374cbSize = CAPI.CAPISafe.CertNameToStrW(CAPI.X509_ASN_ENCODING | CAPI.PKCS_7_ASN_ENCODING, 801if (!CAPI.CAPISafe.CertGetCertificateContextProperty(safeCertContextHandle, 810if (!CAPI.CAPISafe.CertGetCertificateContextProperty(safeCertContextHandle, 837if (CAPI.CAPISafe.CertGetCertificateContextProperty( 886if (CAPI.CAPISafe.CryptAcquireCertificatePrivateKey(safeCertContextHandle,
system\security\cryptography\pkcs\recipientinfo.cs (2)
397if (!CAPI.CAPISafe.CryptMsgGetParam(safeCryptMsgHandle, 406if (!CAPI.CAPISafe.CryptMsgGetParam(safeCryptMsgHandle,
system\security\cryptography\pkcs\signedpkcs7.cs (5)
224if (!CAPI.CAPISafe.CryptMsgGetParam(m_safeCryptMsgHandle, 340if (!CAPI.CAPISafe.CryptMsgUpdate(safeCryptMsgHandle, this.ContentInfo.pContent, (uint) this.ContentInfo.Content.Length, true)) 412SafeCryptMsgHandle safeCryptMsgHandle = CAPI.CAPISafe.CryptMsgOpenToDecode( 423if (!CAPI.CAPISafe.CryptMsgUpdate(safeCryptMsgHandle, encodedMessage, (uint) encodedMessage.Length, true)) 435if (!CAPI.CAPISafe.CryptMsgUpdate(safeCryptMsgHandle, content, (uint) content.Length, true))
system\security\cryptography\pkcs\signerinfo.cs (6)
410if (!CAPI.CAPISafe.CertGetCertificateContextProperty(X509Utils.GetCertContext(certificate), 418if (!CAPI.CAPISafe.CertGetCertificateContextProperty(X509Utils.GetCertContext(certificate), 481if (!CAPI.CAPISafe.CryptMsgVerifyCountersignatureEncoded(IntPtr.Zero, 731if (!CAPI.CAPISafe.CryptMsgGetParam(safeCryptMsgHandle, 741if (!CAPI.CAPISafe.CryptMsgGetParam(safeCryptMsgHandle, 750if (!CAPI.CAPISafe.CryptMsgGetParam(safeCryptMsgHandle,
system\security\cryptography\x509\x509utils.cs (4)
146if (!CAPI.CAPISafe.CertGetCertificateContextProperty(safeCertContext, 158if (!CAPI.CAPISafe.CertGetCertificateContextProperty(safeCertContext, 340if (!CAPI.CAPISafe.CertGetCertificateChain(hChainEngine, 396if (CAPI.CAPISafe.CertVerifyCertificateChainPolicy(pszPolicy, pChainContext, ref PolicyPara, ref PolicyStatus)) {