Skip to content

Commit b64fdd7

Browse files
committed
consts
1 parent 0f68a42 commit b64fdd7

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

stdlib/src/ssl.rs

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ cfg_if::cfg_if! {
2626
}
2727

2828
#[allow(non_upper_case_globals)]
29-
#[pymodule(with(ossl101, windows))]
29+
#[pymodule(with(ossl101, ossl111, windows))]
3030
mod _ssl {
3131
use super::{bio, probe};
3232
use crate::{
@@ -84,19 +84,23 @@ mod _ssl {
8484
SSL_ERROR_WANT_CONNECT,
8585
SSL_ERROR_WANT_READ,
8686
SSL_ERROR_WANT_WRITE,
87-
// #ifdef SSL_OP_SINGLE_ECDH_USE
88-
// SSL_OP_SINGLE_ECDH_USE as OP_SINGLE_ECDH_USE
89-
// #endif
9087
// X509_V_FLAG_CRL_CHECK as VERIFY_CRL_CHECK_LEAF,
9188
// sys::X509_V_FLAG_CRL_CHECK|sys::X509_V_FLAG_CRL_CHECK_ALL as VERIFY_CRL_CHECK_CHAIN
9289
// X509_V_FLAG_X509_STRICT as VERIFY_X509_STRICT,
9390
SSL_ERROR_ZERO_RETURN,
9491
SSL_OP_CIPHER_SERVER_PREFERENCE as OP_CIPHER_SERVER_PREFERENCE,
92+
SSL_OP_LEGACY_SERVER_CONNECT as OP_LEGACY_SERVER_CONNECT,
9593
SSL_OP_NO_SSLv2 as OP_NO_SSLv2,
9694
SSL_OP_NO_SSLv3 as OP_NO_SSLv3,
9795
SSL_OP_NO_TICKET as OP_NO_TICKET,
9896
SSL_OP_NO_TLSv1 as OP_NO_TLSv1,
9997
SSL_OP_SINGLE_DH_USE as OP_SINGLE_DH_USE,
98+
SSL_OP_SINGLE_ECDH_USE as OP_SINGLE_ECDH_USE,
99+
X509_V_FLAG_ALLOW_PROXY_CERTS as VERIFY_ALLOW_PROXY_CERTS,
100+
X509_V_FLAG_CRL_CHECK as VERIFY_CRL_CHECK_LEAF,
101+
X509_V_FLAG_PARTIAL_CHAIN as VERIFY_X509_PARTIAL_CHAIN,
102+
X509_V_FLAG_TRUSTED_FIRST as VERIFY_X509_TRUSTED_FIRST,
103+
X509_V_FLAG_X509_STRICT as VERIFY_X509_STRICT,
100104
};
101105

102106
// taken from CPython, should probably be kept up to date with their version if it ever changes
@@ -150,7 +154,7 @@ mod _ssl {
150154
#[pyattr]
151155
const HAS_SNI: bool = true;
152156
#[pyattr]
153-
const HAS_ECDH: bool = false;
157+
const HAS_ECDH: bool = true;
154158
#[pyattr]
155159
const HAS_NPN: bool = false;
156160
#[pyattr]

0 commit comments

Comments
 (0)