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.

78 lines
2.0 KiB

  1. /*++
  2. Copyright (C) Microsoft Corporation, 2000
  3. Module Name:
  4. keylimit
  5. Abstract:
  6. This file provides the static data structures used to declare National Key
  7. Length Limits.
  8. Author:
  9. Doug Barlow (dbarlow) 2/2/2000
  10. Notes:
  11. ?Notes?
  12. --*/
  13. #ifndef WIN32_LEAN_AND_MEAN
  14. #define WIN32_LEAN_AND_MEAN
  15. #endif
  16. #include <windows.h>
  17. #include <limits.h>
  18. #include <wincrypt.h>
  19. #include <keylimit.h>
  20. // #define KEYLIMIT_API __declspec(dllexport)
  21. #define KEYLIMIT_API
  22. // Shorthand notation
  23. #define PCT CRYPTLIMIT_USING_PCT
  24. #define SGC CRYPTLIMIT_USING_SGC
  25. //
  26. // Add country-specific limit arrays here. These lists will be referenced in
  27. // the locale array, below.
  28. //
  29. /* Here's an example:
  30. static KEYLIMIT_LIMITS FranceLimits[] =
  31. { // Add algorithmic limits here.
  32. //Algorithm Minimum Maximum Required Disallowed
  33. // Id Key Key Flags Flags
  34. //---------------------- ------- ------- -------- ----------
  35. { ALG_CLASS_SIGNATURE, 0, ULONG_MAX, 0, 0 },
  36. { ALG_CLASS_KEY_EXCHANGE, 0, ULONG_MAX, 0, 0 },
  37. { ALG_CLASS_MSG_ENCRYPT, 0, 128, 0, PCT },
  38. { ALG_CLASS_DATA_ENCRYPT, 0, 128, 0, PCT },
  39. { ALG_CLASS_MSG_ENCRYPT, 0, 40, 0, 0 },
  40. { ALG_CLASS_DATA_ENCRYPT, 0, 40, 0, 0 },
  41. { ALG_CLASS_HASH, 0, ULONG_MAX, 0, 0 },
  42. // This entry terminates the list, and disallows any other algId.
  43. { 0, 0, 0, 0, 0 }
  44. };
  45. */
  46. //
  47. // This is the local array. It is the actual exported structure.
  48. //
  49. KEYLIMIT_API KEYLIMIT_LOCALE g_LimitsList[] =
  50. { // Add National Limit structures here.
  51. /* Here's an example:
  52. { CTRY_FRANCE, MAKELANGID(LANG_FRENCH ,SUBLANG_FRENCH), FranceLimits },
  53. */
  54. // This entry terminates the list.
  55. { 0, 0, NULL }
  56. };