Source code of Windows XP (NT5)
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.

126 lines
3.2 KiB

  1. #include "dspch.h"
  2. #pragma hdrstop
  3. #include <wincrypt.h>
  4. #include <signer.h>
  5. #include <mssip.h>
  6. #include <signhlp.h>
  7. static
  8. void WINAPI FreeCryptProvFromCert(BOOL fAcquired,
  9. HCRYPTPROV hProv,
  10. LPWSTR pwszCapiProvider,
  11. DWORD dwProviderType,
  12. LPWSTR pwszTmpContainer)
  13. {
  14. NOTHING;
  15. }
  16. static
  17. BOOL WINAPI GetCryptProvFromCert(
  18. HWND hwnd,
  19. PCCERT_CONTEXT pCert,
  20. HCRYPTPROV *phCryptProv,
  21. DWORD *pdwKeySpec,
  22. BOOL *pfDidCryptAcquire,
  23. LPWSTR *ppwszTmpContainer,
  24. LPWSTR *ppwszProviderName,
  25. DWORD *pdwProviderType
  26. )
  27. {
  28. return FALSE;
  29. }
  30. static
  31. void WINAPI PvkFreeCryptProv(IN HCRYPTPROV hProv,
  32. IN LPCWSTR pwszCapiProvider,
  33. IN DWORD dwProviderType,
  34. IN LPWSTR pwszTmpContainer)
  35. {
  36. NOTHING;
  37. }
  38. static
  39. HRESULT WINAPI PvkGetCryptProv( IN HWND hwnd,
  40. IN LPCWSTR pwszCaption,
  41. IN LPCWSTR pwszCapiProvider,
  42. IN DWORD dwProviderType,
  43. IN LPCWSTR pwszPvkFile,
  44. IN LPCWSTR pwszKeyContainerName,
  45. IN DWORD *pdwKeySpec,
  46. OUT LPWSTR *ppwszTmpContainer,
  47. OUT HCRYPTPROV *phCryptProv)
  48. {
  49. return HRESULT_FROM_WIN32(ERROR_PROC_NOT_FOUND);
  50. }
  51. static
  52. HRESULT WINAPI
  53. SignerFreeSignerContext(
  54. IN SIGNER_CONTEXT *pSignerContext
  55. )
  56. {
  57. return HRESULT_FROM_WIN32(ERROR_PROC_NOT_FOUND);
  58. }
  59. static
  60. HRESULT WINAPI
  61. SignerSignEx(
  62. IN DWORD dwFlags,
  63. IN SIGNER_SUBJECT_INFO *pSubjectInfo,
  64. IN SIGNER_CERT *pSignerCert,
  65. IN SIGNER_SIGNATURE_INFO *pSignatureInfo,
  66. IN SIGNER_PROVIDER_INFO *pProviderInfo,
  67. IN LPCWSTR pwszHttpTimeStamp,
  68. IN PCRYPT_ATTRIBUTES psRequest,
  69. IN LPVOID pSipData,
  70. OUT SIGNER_CONTEXT **ppSignerContext
  71. )
  72. {
  73. return HRESULT_FROM_WIN32(ERROR_PROC_NOT_FOUND);
  74. }
  75. static
  76. HRESULT WINAPI
  77. SignerTimeStampEx(
  78. IN DWORD dwFlags,
  79. IN SIGNER_SUBJECT_INFO *pSubjectInfo,
  80. IN LPCWSTR pwszHttpTimeStamp,
  81. IN PCRYPT_ATTRIBUTES psRequest,
  82. IN LPVOID pSipData,
  83. OUT SIGNER_CONTEXT **ppSignerContext
  84. )
  85. {
  86. return HRESULT_FROM_WIN32(ERROR_PROC_NOT_FOUND);
  87. }
  88. static
  89. HRESULT
  90. SpcGetCertFromKey(IN DWORD dwCertEncodingType,
  91. IN HCERTSTORE hStore,
  92. IN HCRYPTPROV hProv,
  93. IN DWORD hKeySpec,
  94. OUT PCCERT_CONTEXT* pReturnCert)
  95. {
  96. return HRESULT_FROM_WIN32(ERROR_PROC_NOT_FOUND);
  97. }
  98. //
  99. // !! WARNING !! The entries below must be in alphabetical order, and are CASE SENSITIVE (eg lower case comes last!)
  100. //
  101. DEFINE_PROCNAME_ENTRIES(mssign32)
  102. {
  103. DLPENTRY(FreeCryptProvFromCert)
  104. DLPENTRY(GetCryptProvFromCert)
  105. DLPENTRY(PvkFreeCryptProv)
  106. DLPENTRY(PvkGetCryptProv)
  107. DLPENTRY(SignerFreeSignerContext)
  108. DLPENTRY(SignerSignEx)
  109. DLPENTRY(SignerTimeStampEx)
  110. DLPENTRY(SpcGetCertFromKey)
  111. };
  112. DEFINE_PROCNAME_MAP(mssign32)