[Python-checkins] Replace usage of the obscure PEM_read_bio_X509_AUX with the more standard PEM_read_bio_X509 (GH-15303)

Miss Islington (bot) webhook-mailer at python.org
Thu Aug 15 08:56:03 EDT 2019


https://github.com/python/cpython/commit/2b9b70765ce4d955cc2e250878694885363770b8
commit: 2b9b70765ce4d955cc2e250878694885363770b8
branch: 3.7
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: GitHub <noreply at github.com>
date: 2019-08-15T05:55:59-07:00
summary:

Replace usage of the obscure PEM_read_bio_X509_AUX with the more standard PEM_read_bio_X509 (GH-15303)


X509_AUX is an odd, note widely used, OpenSSL extension to the X509 file format. This function doesn't actually use any of the extra metadata that it parses, so just use the standard API.

Automerge-Triggered-By: @tiran
(cherry picked from commit 40dad9545aad4ede89abbab1c1beef5303d9573e)

Co-authored-by: Alex Gaynor <alex.gaynor at gmail.com>

files:
M Modules/_ssl.c

diff --git a/Modules/_ssl.c b/Modules/_ssl.c
index e8955eedfa53..b079663cc223 100644
--- a/Modules/_ssl.c
+++ b/Modules/_ssl.c
@@ -1789,7 +1789,7 @@ _ssl__test_decode_cert_impl(PyObject *module, PyObject *path)
         goto fail0;
     }
 
-    x = PEM_read_bio_X509_AUX(cert,NULL, NULL, NULL);
+    x = PEM_read_bio_X509(cert, NULL, NULL, NULL);
     if (x == NULL) {
         PyErr_SetString(PySSLErrorObject,
                         "Error decoding PEM-encoded file");



More information about the Python-checkins mailing list