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.

37 lines
1.1 KiB

  1. From 1d97b931bf4701fbd3478d2b788ec4310d9eb8e1 Mon Sep 17 00:00:00 2001
  2. From: Rosen Penev <rosenp@gmail.com>
  3. Date: Fri, 7 Jun 2019 18:18:46 -0700
  4. Subject: [PATCH] Add new ASN1_STRING_get0_data API
  5. Introduced with OpenSSL 1.1
  6. ---
  7. src/_cffi_src/openssl/asn1.py | 8 ++++++++
  8. 1 file changed, 8 insertions(+)
  9. diff --git a/src/_cffi_src/openssl/asn1.py b/src/_cffi_src/openssl/asn1.py
  10. index da55b670..85cd58bd 100644
  11. --- a/src/_cffi_src/openssl/asn1.py
  12. +++ b/src/_cffi_src/openssl/asn1.py
  13. @@ -45,6 +45,7 @@ void ASN1_OBJECT_free(ASN1_OBJECT *);
  14. /* ASN1 STRING */
  15. unsigned char *ASN1_STRING_data(ASN1_STRING *);
  16. +const unsigned char *ASN1_STRING_get0_data(const ASN1_STRING *);
  17. int ASN1_STRING_set(ASN1_STRING *, const void *, int);
  18. /* ASN1 OCTET STRING */
  19. @@ -105,4 +106,11 @@ ASN1_NULL *ASN1_NULL_new(void);
  20. """
  21. CUSTOMIZATIONS = """
  22. +#if CRYPTOGRAPHY_OPENSSL_LESS_THAN_110 && !CRYPTOGRAPHY_LIBRESSL_27_OR_GREATER
  23. +#define ASN1_STRING_get0_data ASN1_STRING_data
  24. +#endif
  25. +
  26. +#if (OPENSSL_API_COMPAT >= 0x10100000L) && !CRYPTOGRAPHY_IS_LIBRESSL
  27. +#define ASN1_STRING_data ASN1_STRING_get0_data
  28. +#endif
  29. """
  30. --
  31. 2.26.2