Skip to content

Commit 9108bb0

Browse files
authored
Add ssl version constants (#5662)
* add ssl version constants * try to fix ci * try harder to fix ci * security: if unavailable, set protocol constants to nonexistent version * make linter happy * remove dtls constants * remove superfluous comment
1 parent b3d82f6 commit 9108bb0

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/_cffi_src/openssl/ssl.py

+7
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,12 @@
131131
static const long TLS_ST_BEFORE;
132132
static const long TLS_ST_OK;
133133
134+
static const long SSL3_VERSION;
135+
static const long TLS1_VERSION;
136+
static const long TLS1_1_VERSION;
137+
static const long TLS1_2_VERSION;
138+
static const long TLS1_3_VERSION;
139+
134140
typedef ... SSL_METHOD;
135141
typedef ... SSL_CTX;
136142
@@ -677,6 +683,7 @@
677683
678684
#if CRYPTOGRAPHY_OPENSSL_LESS_THAN_111
679685
static const long Cryptography_HAS_TLSv1_3 = 0;
686+
static const long TLS1_3_VERSION = 0;
680687
static const long SSL_OP_NO_TLSv1_3 = 0;
681688
static const long SSL_VERIFY_POST_HANDSHAKE = 0;
682689
int (*SSL_CTX_set_ciphersuites)(SSL_CTX *, const char *) = NULL;

src/cryptography/hazmat/bindings/openssl/_conditional.py

+1
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,7 @@ def cryptography_has_openssl_cleanup():
198198

199199
def cryptography_has_tlsv13():
200200
return [
201+
"TLS1_3_VERSION",
201202
"SSL_OP_NO_TLSv1_3",
202203
"SSL_VERIFY_POST_HANDSHAKE",
203204
"SSL_CTX_set_ciphersuites",

0 commit comments

Comments
 (0)