41 references to NativeMethods
NuGet.Packaging (41)
Signing\Cms\NativeCms.cs (27)
39NativeUtility.ThrowIfFailed(NativeMethods.CryptMsgGetParam( 48NativeUtility.ThrowIfFailed(NativeMethods.CryptMsgGetParam( 87NativeUtility.ThrowIfFailed(NativeMethods.CryptMsgGetParam( 101NativeUtility.ThrowIfFailed(NativeMethods.CryptMsgGetParam( 131NativeUtility.ThrowIfFailed(NativeMethods.CryptDecodeObject( 133new IntPtr(NativeMethods.PKCS7_SIGNER_INFO), 142NativeUtility.ThrowIfFailed(NativeMethods.CryptDecodeObject( 144new IntPtr(NativeMethods.PKCS7_SIGNER_INFO), 216var handle = NativeMethods.CryptMsgOpenToDecode( 229if (!NativeMethods.CryptMsgUpdate(handle, input, (uint)input.Length, fFinal: true)) 255if (!NativeMethods.CryptMsgControl( 273NativeUtility.ThrowIfFailed(NativeMethods.CryptMsgCountersign( 304if (!NativeMethods.CryptMsgControl( 349if (!NativeMethods.CryptEncodeObjectEx( 351lpszStructType: new IntPtr(NativeMethods.PKCS7_SIGNER_INFO), 359if (err != NativeMethods.ERROR_MORE_DATA) 361Marshal.ThrowExceptionForHR(NativeMethods.GetHRForWin32Error(err)); 366if (!NativeMethods.CryptEncodeObjectEx( 368lpszStructType: new IntPtr(NativeMethods.PKCS7_SIGNER_INFO), 403if (!NativeMethods.CryptMsgControl( 425if (!NativeMethods.CryptMsgControl( 465if (!NativeMethods.CryptEncodeObjectEx( 467lpszStructType: new IntPtr(NativeMethods.PKCS_ATTRIBUTE), 475if (err != NativeMethods.ERROR_MORE_DATA) 477Marshal.ThrowExceptionForHR(NativeMethods.GetHRForWin32Error(err)); 482if (!NativeMethods.CryptEncodeObjectEx( 484lpszStructType: new IntPtr(NativeMethods.PKCS_ATTRIBUTE),
Signing\Cms\NativeMethods.cs (2)
154return NativeMethods.CryptMsgClose(handle); 340if (!hCryptProvOrhNCryptKey.Equals(IntPtr.Zero)) { NativeMethods.CryptReleaseContext(hCryptProvOrhNCryptKey, 0); }
Signing\Cms\NativeUtility.cs (12)
66var hMsg = NativeMethods.CryptMsgOpenToEncode( 69dwMsgType: NativeMethods.CMSG_SIGNED, 76ThrowIfFailed(NativeMethods.CryptMsgUpdate( 84ThrowIfFailed(NativeMethods.CryptMsgGetParam( 93ThrowIfFailed(NativeMethods.CryptMsgGetParam( 128certContextHandle = NativeMethods.CertDuplicateCertificateContext(cmsSigner.Certificate.Handle); 133ThrowIfFailed(NativeMethods.CertGetCertificateContextProperty( 135NativeMethods.CERT_KEY_IDENTIFIER_PROP_ID, 143ThrowIfFailed(NativeMethods.CertGetCertificateContextProperty( 145NativeMethods.CERT_KEY_IDENTIFIER_PROP_ID, 149signerInfo.SignerId.dwIdChoice = NativeMethods.CERT_ID_KEY_IDENTIFIER; 158NativeMethods.CertFreeCertificateContext(certContextHandle);