File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed
cryptography/hazmat/bindings/openssl Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change 4141static const long Cryptography_HAS_SSL_OP_MSIE_SSLV2_RSA_PADDING;
4242static const long Cryptography_HAS_SSL_SET_SSL_CTX;
4343static const long Cryptography_HAS_SSL_OP_NO_TICKET;
44+ static const long Cryptography_HAS_SSL_OP_IGNORE_UNEXPECTED_EOF;
4445static const long Cryptography_HAS_ALPN;
4546static const long Cryptography_HAS_NEXTPROTONEG;
4647static const long Cryptography_HAS_SET_CERT_CB;
9596static const long SSL_OP_SINGLE_ECDH_USE;
9697static const long SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION;
9798static const long SSL_OP_LEGACY_SERVER_CONNECT;
99+ static const long SSL_OP_IGNORE_UNEXPECTED_EOF;
98100static const long SSL_VERIFY_PEER;
99101static const long SSL_VERIFY_FAIL_IF_NO_PEER_CERT;
100102static const long SSL_VERIFY_CLIENT_ONCE;
603605static const long SSL_OP_NO_RENEGOTIATION = 0;
604606#endif
605607
608+ #ifdef SSL_OP_IGNORE_UNEXPECTED_EOF
609+ static const long Cryptography_HAS_SSL_OP_IGNORE_UNEXPECTED_EOF = 1;
610+ #else
611+ static const long Cryptography_HAS_SSL_OP_IGNORE_UNEXPECTED_EOF = 0;
612+ static const long SSL_OP_IGNORE_UNEXPECTED_EOF = 1;
613+ #endif
614+
606615#if CRYPTOGRAPHY_IS_LIBRESSL
607616void (*SSL_CTX_set_cert_cb)(SSL_CTX *, int (*)(SSL *, void *), void *) = NULL;
608617void (*SSL_set_cert_cb)(SSL *, int (*)(SSL *, void *), void *) = NULL;
Original file line number Diff line number Diff line change @@ -309,6 +309,12 @@ def cryptography_has_pkcs12_set_mac() -> typing.List[str]:
309309 return ["PKCS12_set_mac" ]
310310
311311
312+ def cryptography_has_ssl_op_ignore_unexpected_eof () -> typing .List [str ]:
313+ return [
314+ "SSL_OP_IGNORE_UNEXPECTED_EOF" ,
315+ ]
316+
317+
312318# This is a mapping of
313319# {condition: function-returning-names-dependent-on-that-condition} so we can
314320# loop over them and delete unsupported names at runtime. It will be removed
@@ -369,4 +375,7 @@ def cryptography_has_pkcs12_set_mac() -> typing.List[str]:
369375 cryptography_has_unexpected_eof_while_reading
370376 ),
371377 "Cryptography_HAS_PKCS12_SET_MAC" : cryptography_has_pkcs12_set_mac ,
378+ "Cryptography_HAS_SSL_OP_IGNORE_UNEXPECTED_EOF" : (
379+ cryptography_has_ssl_op_ignore_unexpected_eof
380+ ),
372381}
You can’t perform that action at this time.
0 commit comments