We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4578191 commit c262032Copy full SHA for c262032
stdlib/src/ssl.rs
@@ -568,6 +568,13 @@ mod _ssl {
568
.set_session_id_context(b"Python")
569
.map_err(|e| convert_openssl_error(vm, e))?;
570
571
+ // Set default verify flags: VERIFY_X509_TRUSTED_FIRST
572
+ unsafe {
573
+ let ctx_ptr = builder.as_ptr();
574
+ let param = sys::SSL_CTX_get0_param(ctx_ptr);
575
+ sys::X509_VERIFY_PARAM_set_flags(param, sys::X509_V_FLAG_TRUSTED_FIRST);
576
+ }
577
+
578
PySslContext {
579
ctx: PyRwLock::new(builder),
580
check_hostname: AtomicCell::new(check_hostname),
0 commit comments