nid.py 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. # This file is dual licensed under the terms of the Apache License, Version
  2. # 2.0, and the BSD License. See the LICENSE file in the root of this repository
  3. # for complete details.
  4. from __future__ import absolute_import, division, print_function
  5. INCLUDES = """
  6. #include <openssl/obj_mac.h>
  7. """
  8. TYPES = """
  9. static const int Cryptography_HAS_ED448;
  10. static const int Cryptography_HAS_ED25519;
  11. static const int Cryptography_HAS_POLY1305;
  12. static const int NID_undef;
  13. static const int NID_pbe_WithSHA1And3_Key_TripleDES_CBC;
  14. static const int NID_X25519;
  15. static const int NID_X448;
  16. static const int NID_ED25519;
  17. static const int NID_ED448;
  18. static const int NID_poly1305;
  19. static const int NID_subject_alt_name;
  20. static const int NID_crl_reason;
  21. static const int NID_pkcs7_signed;
  22. """
  23. FUNCTIONS = """
  24. """
  25. CUSTOMIZATIONS = """
  26. #ifndef NID_ED25519
  27. static const long Cryptography_HAS_ED25519 = 0;
  28. static const int NID_ED25519 = 0;
  29. #else
  30. static const long Cryptography_HAS_ED25519 = 1;
  31. #endif
  32. #ifndef NID_ED448
  33. static const long Cryptography_HAS_ED448 = 0;
  34. static const int NID_ED448 = 0;
  35. #else
  36. static const long Cryptography_HAS_ED448 = 1;
  37. #endif
  38. #ifndef NID_poly1305
  39. static const long Cryptography_HAS_POLY1305 = 0;
  40. static const int NID_poly1305 = 0;
  41. #else
  42. static const long Cryptography_HAS_POLY1305 = 1;
  43. #endif
  44. """