//+------------------------------------------------------------------------- // // Microsoft Windows // // Copyright (C) Microsoft Corporation, 1997 - 1999 // // File: sclgnrpc.idl // //-------------------------------------------------------------------------- import "unknwn.idl"; #define NTSTATUS LONG typedef struct _OUT_BUFFER1 { DWORD cb; [size_is(cb)] BYTE *pb; } OUT_BUFFER1, *POUT_BUFFER1; typedef struct _OUT_BUFFER2 { ULONG cb; [size_is(cb)] BYTE *pb; } OUT_BUFFER2, *POUT_BUFFER2; //////////////////////////// // Interfaces [ uuid(95958c94-a424-4055-b62b-b7f4d5c47770), version(1.0), pointer_default(unique) ] interface IRPCSCLogon { typedef [context_handle] void *BINDING_CONTEXT; NTSTATUS RPC_ScHelperInitializeContext( [in] handle_t h, [in] DWORD cbLogonInfo, [in][size_is(cbLogonInfo)] BYTE *pbLogonInfo, [in, out] BINDING_CONTEXT *pBindingContext ); NTSTATUS RPC_ScHelperRelease( [in] handle_t h, [in, out] BINDING_CONTEXT *pBindingContext ); NTSTATUS RPC_ScHelperGetCertFromLogonInfo( [in] handle_t h, [in] BINDING_CONTEXT BindingContext, [in][unique] LPCWSTR wszPIN, [out] OUT_BUFFER1 *pCertContextBuffer ); NTSTATUS RPC_ScHelperGetProvParam( [in] handle_t h, [in] BINDING_CONTEXT BindingContext, [in][unique] LPCWSTR wszPIN, [in] BOOL fBindingIsCertAndKey, [in] DWORD dwParam, [in][out] DWORD *pdwDataLen, [out] OUT_BUFFER1 *pbData, [in] DWORD dwFlags ); NTSTATUS RPC_ScHelperGenRandBits( [in] handle_t h, [in] BINDING_CONTEXT BindingContext, [in][out] BYTE bR1[32], [in][out] BYTE bR2[32] ); NTSTATUS RPC_ScHelperVerifyCardAndCreds( [in] handle_t h, [in] BINDING_CONTEXT BindingContext, [in][unique] LPCWSTR wszPIN, [in] ULONG EncryptedDataSize, [in][size_is(EncryptedDataSize)] BYTE *EncryptedData, [in][out] ULONG *pCleartextDataSize, [out] OUT_BUFFER2 *pCleartextData ); NTSTATUS RPC_ScHelperEncryptCredentials( [in] handle_t h, [in] BINDING_CONTEXT BindingContext, [in][unique] LPCWSTR wszPIN, [in] BYTE bR1[32], [in] BYTE bR2[32], [in] ULONG CleartextDataSize, [in][size_is(CleartextDataSize)] BYTE *CleartextData, [in][out] ULONG *pEncryptedDataSize, [out] OUT_BUFFER2 *pEncryptedData ); NTSTATUS RPC_ScHelperSignMessage( [in] handle_t h, [in] BINDING_CONTEXT BindingContext, [in][unique] LPCWSTR wszPIN, [in] BOOL fBindingIsCertAndKey, [in] ULONG Algorithm, [in] ULONG BufferLength, [in][size_is(BufferLength)] BYTE *Buffer, [in][out] ULONG *pSignatureLength, [out] OUT_BUFFER2 *pSignature ); NTSTATUS RPC_ScHelperVerifyMessage( [in] handle_t h, [in] BINDING_CONTEXT BindingContext, [in] ULONG Algorithm, [in] ULONG BufferLength, [in][size_is(BufferLength)] BYTE *Buffer, [in] ULONG SignatureLength, [in][size_is(SignatureLength)] BYTE *Signature ); NTSTATUS RPC_ScHelperSignPkcsMessage( [in] handle_t h, [in] BINDING_CONTEXT BindingContext, [in][unique] LPCWSTR wszPIN, [in] BOOL fBindingIsCertAndKey, [in] LPSTR AlgorithmPszObjId, [in] DWORD AlgorithmParametersLength, [in][unique][size_is(AlgorithmParametersLength)] BYTE *AlgorithmParameters, [in] DWORD dwSignMessageFlags, [in] ULONG BufferLength, [in][size_is(BufferLength)] BYTE *Buffer, [in][out] ULONG *pSignedBufferLength, [out] OUT_BUFFER2 *pSignedBuffer ); /*NTSTATUS RPC_ScHelperVerifyPkcsMessage( [in] handle_t h, [in] BINDING_CONTEXT BindingContext, [in] ULONG BufferLength, [in][size_is(BufferLength)] BYTE *Buffer, [in][out] ULONG *pDecodedBufferLength, [out] OUT_BUFFER2 *pDecodedBuffer, [in] BOOL fCertContextRequested, [out] OUT_BUFFER1 *pCertContext );*/ NTSTATUS RPC_ScHelperDecryptMessage( [in] handle_t h, [in] BINDING_CONTEXT BindingContext, [in][unique] LPCWSTR wszPIN, [in] BOOL fBindingIsCertAndKey, [in] ULONG CipherLength, [in][size_is(CipherLength)] BYTE *CipherText, [in][out] ULONG *pClearTextLength, [out] OUT_BUFFER2 *pClearText ); NTSTATUS RPC_ScHelper_CryptAcquireCertificatePrivateKey( [in] handle_t h, [in] ULONG CertContextLength, [in][size_is(CertContextLength)] BYTE *CertContext, [in][unique] LPCWSTR pwszContainerName, [in][unique] LPCWSTR pwszProvName, [in] DWORD dwProvType, [in] DWORD dwFlags, [in] DWORD dwKeySpec, [in, out] BINDING_CONTEXT *ppCertAndKey, [out] DWORD *pLastError ); NTSTATUS RPC_ScHelper_CryptSetProvParam( [in] handle_t h, [in] BINDING_CONTEXT pCertAndKey, [in][unique] LPCSTR pszPIN, [out] DWORD *pLastError ); NTSTATUS RPC_ScHelper_CryptReleaseContext( [in] handle_t h, [in, out] BINDING_CONTEXT *ppCertAndKey ); }