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.

83 lines
2.1 KiB

  1. /*++
  2. Copyright (c) 1997 Microsoft Corporation
  3. Module Name:
  4. certutil.hxx
  5. Abstract:
  6. Definitions and data structures for helper functions used to deal with server certs
  7. Author:
  8. Alex Mallet (amallet) 03-Dec-1997
  9. --*/
  10. #ifndef _CAPIUTIL_HXX_
  11. #define _CAPIUTIL_HXX_
  12. #ifndef dllexp
  13. #define dllexp __declspec( dllexport )
  14. #endif
  15. //
  16. // Enums and hash defines
  17. //
  18. #define DEFAULT_SERVER_CERT_MD_PATH "/LM/W3SVC"
  19. #define DEFAULT_CTL_MD_PATH "/LM/W3SVC"
  20. enum {
  21. CERT_ERR_NONE = 0, //No error
  22. CERT_ERR_MB, //error reading data out of MB
  23. CERT_ERR_CAPI, //Error calling CAPI function
  24. CERT_ERR_CERT_NOT_FOUND, //Couldn't find the cert
  25. CERT_ERR_INTERNAL, //Generic error
  26. CERT_ERR_END //end of table
  27. };
  28. // Array holding properties required to reconstruct cert context
  29. static DWORD adwMetabaseCertProperties[] = { MD_SSL_CERT_HASH, BINARY_METADATA,
  30. MD_SSL_CERT_STORE_NAME, STRING_METADATA };
  31. #define cNumCertMetabaseProperties sizeof(adwMetabaseCertProperties)/sizeof(DWORD)
  32. // Array holding properties necessary to reconstruct CTL context
  33. static DWORD adwMetabaseCTLProperties[] = { MD_SSL_CTL_IDENTIFIER, STRING_METADATA,
  34. MD_SSL_CTL_STORE_NAME, STRING_METADATA };
  35. #define cNumCTLMetabaseProperties sizeof(adwMetabaseCTLProperties)/sizeof(DWORD)
  36. //
  37. // Function prototypes
  38. //
  39. OPEN_CERT_STORE_INFO* ReadCertStoreInfoFromMB( IN IMDCOM *pMDObject,
  40. IN LPTSTR pszMBPath,
  41. IN BOOL fCTL );
  42. BOOL RetrieveBlobFromMetabase(MB *pMB,
  43. LPTSTR pszKey IN,
  44. PMETADATA_RECORD pMDR OUT,
  45. DWORD dwSizeHint = 0);
  46. dllexp BOOL ServerAddressHasCAPIInfo( MB *pMB,
  47. LPTSTR pszCredPath,
  48. DWORD *pdwProperties,
  49. DWORD cProperties );
  50. BOOL CopyString( OUT LPTSTR *ppszDest,
  51. IN LPTSTR pszSrc );
  52. #endif // _CAPIUTIL_HXX_