Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

194 lines
9.5 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (C) Microsoft Corporation, 1997 - 1999
  6. //
  7. // File: sclgnrpc.idl
  8. //
  9. //--------------------------------------------------------------------------
  10. import "unknwn.idl";
  11. #define NTSTATUS LONG
  12. typedef struct _OUT_BUFFER1 {
  13. DWORD cb;
  14. [size_is(cb)] BYTE *pb;
  15. } OUT_BUFFER1, *POUT_BUFFER1;
  16. typedef struct _OUT_BUFFER2 {
  17. ULONG cb;
  18. [size_is(cb)] BYTE *pb;
  19. } OUT_BUFFER2, *POUT_BUFFER2;
  20. ////////////////////////////
  21. // Interfaces
  22. [
  23. uuid(95958c94-a424-4055-b62b-b7f4d5c47770),
  24. version(1.0),
  25. pointer_default(unique)
  26. ]
  27. interface IRPCSCLogon
  28. {
  29. typedef [context_handle] void *BINDING_CONTEXT;
  30. NTSTATUS
  31. RPC_ScHelperInitializeContext(
  32. [in] handle_t h,
  33. [in] DWORD cbLogonInfo,
  34. [in][size_is(cbLogonInfo)] BYTE *pbLogonInfo,
  35. [in, out] BINDING_CONTEXT *pBindingContext
  36. );
  37. NTSTATUS
  38. RPC_ScHelperRelease(
  39. [in] handle_t h,
  40. [in, out] BINDING_CONTEXT *pBindingContext
  41. );
  42. NTSTATUS
  43. RPC_ScHelperGetCertFromLogonInfo(
  44. [in] handle_t h,
  45. [in] BINDING_CONTEXT BindingContext,
  46. [in][unique] LPCWSTR wszPIN,
  47. [out] OUT_BUFFER1 *pCertContextBuffer
  48. );
  49. NTSTATUS
  50. RPC_ScHelperGetProvParam(
  51. [in] handle_t h,
  52. [in] BINDING_CONTEXT BindingContext,
  53. [in][unique] LPCWSTR wszPIN,
  54. [in] BOOL fBindingIsCertAndKey,
  55. [in] DWORD dwParam,
  56. [in][out] DWORD *pdwDataLen,
  57. [out] OUT_BUFFER1 *pbData,
  58. [in] DWORD dwFlags
  59. );
  60. NTSTATUS
  61. RPC_ScHelperGenRandBits(
  62. [in] handle_t h,
  63. [in] BINDING_CONTEXT BindingContext,
  64. [in][out] BYTE bR1[32],
  65. [in][out] BYTE bR2[32]
  66. );
  67. NTSTATUS
  68. RPC_ScHelperVerifyCardAndCreds(
  69. [in] handle_t h,
  70. [in] BINDING_CONTEXT BindingContext,
  71. [in][unique] LPCWSTR wszPIN,
  72. [in] ULONG EncryptedDataSize,
  73. [in][size_is(EncryptedDataSize)] BYTE *EncryptedData,
  74. [in][out] ULONG *pCleartextDataSize,
  75. [out] OUT_BUFFER2 *pCleartextData
  76. );
  77. NTSTATUS
  78. RPC_ScHelperEncryptCredentials(
  79. [in] handle_t h,
  80. [in] BINDING_CONTEXT BindingContext,
  81. [in][unique] LPCWSTR wszPIN,
  82. [in] BYTE bR1[32],
  83. [in] BYTE bR2[32],
  84. [in] ULONG CleartextDataSize,
  85. [in][size_is(CleartextDataSize)] BYTE *CleartextData,
  86. [in][out] ULONG *pEncryptedDataSize,
  87. [out] OUT_BUFFER2 *pEncryptedData
  88. );
  89. NTSTATUS
  90. RPC_ScHelperSignMessage(
  91. [in] handle_t h,
  92. [in] BINDING_CONTEXT BindingContext,
  93. [in][unique] LPCWSTR wszPIN,
  94. [in] BOOL fBindingIsCertAndKey,
  95. [in] ULONG Algorithm,
  96. [in] ULONG BufferLength,
  97. [in][size_is(BufferLength)] BYTE *Buffer,
  98. [in][out] ULONG *pSignatureLength,
  99. [out] OUT_BUFFER2 *pSignature
  100. );
  101. NTSTATUS
  102. RPC_ScHelperVerifyMessage(
  103. [in] handle_t h,
  104. [in] BINDING_CONTEXT BindingContext,
  105. [in] ULONG Algorithm,
  106. [in] ULONG BufferLength,
  107. [in][size_is(BufferLength)] BYTE *Buffer,
  108. [in] ULONG SignatureLength,
  109. [in][size_is(SignatureLength)] BYTE *Signature
  110. );
  111. NTSTATUS
  112. RPC_ScHelperSignPkcsMessage(
  113. [in] handle_t h,
  114. [in] BINDING_CONTEXT BindingContext,
  115. [in][unique] LPCWSTR wszPIN,
  116. [in] BOOL fBindingIsCertAndKey,
  117. [in] LPSTR AlgorithmPszObjId,
  118. [in] DWORD AlgorithmParametersLength,
  119. [in][unique][size_is(AlgorithmParametersLength)] BYTE *AlgorithmParameters,
  120. [in] DWORD dwSignMessageFlags,
  121. [in] ULONG BufferLength,
  122. [in][size_is(BufferLength)] BYTE *Buffer,
  123. [in][out] ULONG *pSignedBufferLength,
  124. [out] OUT_BUFFER2 *pSignedBuffer
  125. );
  126. /*NTSTATUS
  127. RPC_ScHelperVerifyPkcsMessage(
  128. [in] handle_t h,
  129. [in] BINDING_CONTEXT BindingContext,
  130. [in] ULONG BufferLength,
  131. [in][size_is(BufferLength)] BYTE *Buffer,
  132. [in][out] ULONG *pDecodedBufferLength,
  133. [out] OUT_BUFFER2 *pDecodedBuffer,
  134. [in] BOOL fCertContextRequested,
  135. [out] OUT_BUFFER1 *pCertContext
  136. );*/
  137. NTSTATUS
  138. RPC_ScHelperDecryptMessage(
  139. [in] handle_t h,
  140. [in] BINDING_CONTEXT BindingContext,
  141. [in][unique] LPCWSTR wszPIN,
  142. [in] BOOL fBindingIsCertAndKey,
  143. [in] ULONG CipherLength,
  144. [in][size_is(CipherLength)] BYTE *CipherText,
  145. [in][out] ULONG *pClearTextLength,
  146. [out] OUT_BUFFER2 *pClearText
  147. );
  148. NTSTATUS
  149. RPC_ScHelper_CryptAcquireCertificatePrivateKey(
  150. [in] handle_t h,
  151. [in] ULONG CertContextLength,
  152. [in][size_is(CertContextLength)] BYTE *CertContext,
  153. [in][unique] LPCWSTR pwszContainerName,
  154. [in][unique] LPCWSTR pwszProvName,
  155. [in] DWORD dwProvType,
  156. [in] DWORD dwFlags,
  157. [in] DWORD dwKeySpec,
  158. [in, out] BINDING_CONTEXT *ppCertAndKey,
  159. [out] DWORD *pLastError
  160. );
  161. NTSTATUS
  162. RPC_ScHelper_CryptSetProvParam(
  163. [in] handle_t h,
  164. [in] BINDING_CONTEXT pCertAndKey,
  165. [in][unique] LPCSTR pszPIN,
  166. [out] DWORD *pLastError
  167. );
  168. NTSTATUS
  169. RPC_ScHelper_CryptReleaseContext(
  170. [in] handle_t h,
  171. [in, out] BINDING_CONTEXT *ppCertAndKey
  172. );
  173. }