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.

54 lines
1.9 KiB

  1. /*
  2. * kmsattr.h
  3. *
  4. * constants shared between KMServer.exe and ExPolicy.dll
  5. *
  6. * Owner : Greg Kramer (gregkr)
  7. *
  8. * Copyright 1986-1997 Microsoft Corporation. All Rights Reserved.
  9. *
  10. */
  11. #ifndef _KMSATTR_H_
  12. #define _KMSATTR_H_
  13. // syntax of Submit::Attributes is
  14. // name:value\n
  15. // '-' and ' ' are stripped from name.
  16. // leading and trailing whitespace stripped from name and from value.
  17. const WCHAR k_wszSubjAltNameRFC822 [] = L"SubjAltNameRFC822";
  18. const WCHAR k_wszSubjAltNameDisplay [] = L"SubjAltNameDisplay";
  19. const WCHAR k_wszKeyUsage [] = L"KeyUsage";
  20. const WCHAR k_wszKMServerName [] = L"KMServerName";
  21. // count of attributes sent from KMServer to ExPolicy :
  22. // SubjAltNameRFC822, SubjAltNameDisplay, KeyUsage, and KMServerName
  23. const ULONG k_cAttrNames = 4;
  24. const WCHAR k_wchTerminateName = L':';
  25. const WCHAR k_wchTerminateValue = L'\n';
  26. const WCHAR k_wszUsageSealing [] = L"1";
  27. const WCHAR k_wszUsageSigning [] = L"2";
  28. const ULONG k_cchmaxUsage = 1; // cch of longest value
  29. const ULONG k_cchNamesAndTerminaters =
  30. (sizeof(k_wszSubjAltNameRFC822) / sizeof(WCHAR) ) - 1 +
  31. (sizeof(k_wszSubjAltNameDisplay) / sizeof(WCHAR) ) - 1 +
  32. (sizeof(k_wszKeyUsage) / sizeof(WCHAR) ) - 1 +
  33. (sizeof(k_wszKMServerName) / sizeof(WCHAR) ) - 1 +
  34. k_cAttrNames + // name terminaters
  35. k_cAttrNames; // value terminaters
  36. // don't include string terminaters
  37. const WCHAR k_wszSubjectAltName [] = L"SubjectAltName";
  38. const WCHAR k_wszSubjectAltName2 [] = L"SubjectAltName2";
  39. const WCHAR k_wszIssuerAltName [] = L"IssuerAltName";
  40. const WCHAR k_wszSpecialAttribute [] = L"Special";
  41. const ULONG k_cchSpecialAttribute =
  42. (sizeof(k_wszSpecialAttribute) / sizeof(WCHAR) ) - 1;
  43. #endif // ! _KMSATTR_H_