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.

94 lines
1.9 KiB

  1. /*++
  2. Copyright (c) 1994-1998 Microsoft Corporation
  3. Module Name:
  4. global.h
  5. Abstract:
  6. Global data definitions for tshare security.
  7. Author:
  8. Madan Appiah (madana) 24-Jan-1998
  9. Environment:
  10. User Mode - Win32
  11. Revision History:
  12. --*/
  13. #ifndef _GLOBAL_H_
  14. #define _GLOBAL_H_
  15. //-----------------------------------------------------------------------------
  16. //
  17. // global data definitions.
  18. //
  19. //-----------------------------------------------------------------------------
  20. #define CSP_MUTEX_NAME L"Global\\LSCSPMUTEX658fe2e8"
  21. extern LPBSAFE_PUB_KEY csp_pRootPublicKey;
  22. extern BYTE csp_abPublicKeyModulus[92];
  23. extern LPBYTE csp_abServerCertificate;
  24. extern DWORD csp_dwServerCertificateLen;
  25. extern LPBYTE csp_abServerX509Cert;
  26. extern DWORD csp_dwServerX509CertLen;
  27. extern LPBYTE csp_abServerPrivateKey;
  28. extern DWORD csp_dwServerPrivateKeyLen;
  29. extern LPBYTE csp_abX509CertPrivateKey;
  30. extern DWORD csp_dwX509CertPrivateKeyLen;
  31. extern LPBYTE csp_abX509CertID;
  32. extern DWORD csp_dwX509CertIDLen;
  33. extern Hydra_Server_Cert csp_hscData;
  34. extern HINSTANCE g_hinst;
  35. extern HANDLE csp_hMutex;
  36. extern LONG csp_InitCount;
  37. //-----------------------------------------------------------------------------
  38. //
  39. // Crypto-related definitions
  40. //
  41. //-----------------------------------------------------------------------------
  42. #define RSA_KEY_LEN 512
  43. #define CAPI_MAX_VERSION 2
  44. #define RDN_COMMON_NAME "cn="
  45. //-----------------------------------------------------------------------------
  46. //
  47. // Macros
  48. //
  49. //-----------------------------------------------------------------------------
  50. #define ACQUIRE_EXCLUSIVE_ACCESS( x ) \
  51. if( x ) \
  52. { \
  53. WaitForSingleObject(x, INFINITE); \
  54. }
  55. #define RELEASE_EXCLUSIVE_ACCESS( x ) \
  56. if( x ) \
  57. { \
  58. ReleaseMutex(x); \
  59. }
  60. #endif // _GLOBAL_H_