summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorl0x <37248016+l0x-c0d3z@users.noreply.github.com>2021-04-19 11:51:18 (GMT)
committerGitHub <noreply@github.com>2021-04-19 11:51:18 (GMT)
commit64d975202f7a91cb8c61a050fafb4e934fcbaa4e (patch)
tree82da5e11cebb3462224f2afbfd8c9e40b8823961 /Modules
parentd37b74f341c5a215e2fdd5eb4f8c0182f327635c (diff)
downloadcpython-64d975202f7a91cb8c61a050fafb4e934fcbaa4e.zip
cpython-64d975202f7a91cb8c61a050fafb4e934fcbaa4e.tar.gz
cpython-64d975202f7a91cb8c61a050fafb4e934fcbaa4e.tar.bz2
bpo-40849: Expose X509_V_FLAG_PARTIAL_CHAIN ssl flag (GH-20463)
This short PR exposes an openssl flag that wasn't exposed. I've also updated to doc to reflect the change. It's heavily inspired by 990fcaac3c428569697f62a80fd95ab4d4b93151.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_ssl.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/Modules/_ssl.c b/Modules/_ssl.c
index 934c59e..4b84014 100644
--- a/Modules/_ssl.c
+++ b/Modules/_ssl.c
@@ -5630,6 +5630,11 @@ sslmodule_init_constants(PyObject *m)
PyModule_AddIntConstant(m, "VERIFY_X509_TRUSTED_FIRST",
X509_V_FLAG_TRUSTED_FIRST);
+#ifdef X509_V_FLAG_PARTIAL_CHAIN
+ PyModule_AddIntConstant(m, "VERIFY_X509_PARTIAL_CHAIN",
+ X509_V_FLAG_PARTIAL_CHAIN);
+#endif
+
/* Alert Descriptions from ssl.h */
/* note RESERVED constants no longer intended for use have been removed */
/* http://www.iana.org/assignments/tls-parameters/tls-parameters.xml#tls-parameters-6 */