aboutsummaryrefslogtreecommitdiffstats
path: root/src/_cffi_src/openssl
diff options
context:
space:
mode:
authorFraser Tweedale <frase@frase.id.au>2016-11-12 01:28:56 +1000
committerPaul Kehrer <paul.l.kehrer@gmail.com>2016-11-11 07:28:56 -0800
commit01ee6f5e391eee76e6cd3062de8fc84851bd06e3 (patch)
tree3309443a73201bcec03c5bb14df019e49eae798c /src/_cffi_src/openssl
parent44eb89e911db7298a29640c9073c9e2ff4d5f806 (diff)
downloadcryptography-01ee6f5e391eee76e6cd3062de8fc84851bd06e3.tar.gz
cryptography-01ee6f5e391eee76e6cd3062de8fc84851bd06e3.tar.bz2
cryptography-01ee6f5e391eee76e6cd3062de8fc84851bd06e3.zip
Name: add support for multi-value RDNs (#3202)
Update the Name class to accept and internally store a list of RelativeDistinguishedName objects. Add the 'rdns' attribute to give access to the RDNs. Update ASN.1 routines to correctly decode and encode multi-value RDNs. Fixes: https://github.com/pyca/cryptography/issues/3199
Diffstat (limited to 'src/_cffi_src/openssl')
-rw-r--r--src/_cffi_src/openssl/x509name.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/_cffi_src/openssl/x509name.py b/src/_cffi_src/openssl/x509name.py
index 30acbdbb..0554a024 100644
--- a/src/_cffi_src/openssl/x509name.py
+++ b/src/_cffi_src/openssl/x509name.py
@@ -35,6 +35,7 @@ void X509_NAME_ENTRY_free(X509_NAME_ENTRY *);
int X509_NAME_get_index_by_NID(X509_NAME *, int, int);
int X509_NAME_cmp(const X509_NAME *, const X509_NAME *);
X509_NAME *X509_NAME_dup(X509_NAME *);
+int Cryptography_X509_NAME_ENTRY_set(X509_NAME_ENTRY *);
"""
MACROS = """
@@ -76,4 +77,13 @@ Cryptography_STACK_OF_X509_NAME_ENTRY *sk_X509_NAME_ENTRY_dup(
"""
CUSTOMIZATIONS = """
+#if CRYPTOGRAPHY_OPENSSL_110_OR_GREATER && !defined(LIBRESSL_VERSION_NUMBER)
+int Cryptography_X509_NAME_ENTRY_set(X509_NAME_ENTRY *ne) {
+ return X509_NAME_ENTRY_set(ne);
+}
+#else
+int Cryptography_X509_NAME_ENTRY_set(X509_NAME_ENTRY *ne) {
+ return ne->set;
+}
+#endif
"""