File tree Expand file tree Collapse file tree 4 files changed +15
-0
lines changed Expand file tree Collapse file tree 4 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -634,6 +634,13 @@ Constants
634
634
635
635
.. versionadded :: 3.4
636
636
637
+ .. data :: VERIFY_ALLOW_PROXY_CERTS
638
+
639
+ Possible value for :attr: `SSLContext.verify_flags ` to enables proxy
640
+ certificate verification.
641
+
642
+ .. versionadded :: 3.9
643
+
637
644
.. data :: VERIFY_X509_TRUSTED_FIRST
638
645
639
646
Possible value for :attr: `SSLContext.verify_flags `. It instructs OpenSSL to
Original file line number Diff line number Diff line change @@ -1305,6 +1305,8 @@ def test_verify_flags(self):
1305
1305
self .assertEqual (ctx .verify_flags , ssl .VERIFY_CRL_CHECK_CHAIN )
1306
1306
ctx .verify_flags = ssl .VERIFY_DEFAULT
1307
1307
self .assertEqual (ctx .verify_flags , ssl .VERIFY_DEFAULT )
1308
+ ctx .verify_flags = ssl .VERIFY_ALLOW_PROXY_CERTS
1309
+ self .assertEqual (ctx .verify_flags , ssl .VERIFY_ALLOW_PROXY_CERTS )
1308
1310
# supports any value
1309
1311
ctx .verify_flags = ssl .VERIFY_CRL_CHECK_LEAF | ssl .VERIFY_X509_STRICT
1310
1312
self .assertEqual (ctx .verify_flags ,
Original file line number Diff line number Diff line change
1
+ Expose ``X509_V_FLAG_ALLOW_PROXY_CERTS `` as
2
+ :data: `~ssl.VERIFY_ALLOW_PROXY_CERTS ` to allow proxy certificate validation
3
+ as explained in
4
+ https://www.openssl.org/docs/man1.1.1/man7/proxy-certificates.html.
Original file line number Diff line number Diff line change @@ -6181,6 +6181,8 @@ sslmodule_init_constants(PyObject *m)
6181
6181
X509_V_FLAG_CRL_CHECK |X509_V_FLAG_CRL_CHECK_ALL );
6182
6182
PyModule_AddIntConstant (m , "VERIFY_X509_STRICT" ,
6183
6183
X509_V_FLAG_X509_STRICT );
6184
+ PyModule_AddIntConstant (m , "VERIFY_ALLOW_PROXY_CERTS" ,
6185
+ X509_V_FLAG_ALLOW_PROXY_CERTS );
6184
6186
#ifdef X509_V_FLAG_TRUSTED_FIRST
6185
6187
PyModule_AddIntConstant (m , "VERIFY_X509_TRUSTED_FIRST" ,
6186
6188
X509_V_FLAG_TRUSTED_FIRST );
You can’t perform that action at this time.
0 commit comments