Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c54de47

Browse files
committed
ifdef our way to compatibility with old openssl (closes #23335)
1 parent aaef05f commit c54de47

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Modules/_ssl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2275,6 +2275,7 @@ set_ciphers(PySSLContext *self, PyObject *args)
22752275
Py_RETURN_NONE;
22762276
}
22772277

2278+
#ifdef OPENSSL_NPN_NEGOTIATED
22782279
static int
22792280
do_protocol_selection(int alpn, unsigned char **out, unsigned char *outlen,
22802281
const unsigned char *server_protocols, unsigned int server_protocols_len,
@@ -2299,7 +2300,6 @@ do_protocol_selection(int alpn, unsigned char **out, unsigned char *outlen,
22992300
return SSL_TLSEXT_ERR_OK;
23002301
}
23012302

2302-
#ifdef OPENSSL_NPN_NEGOTIATED
23032303
/* this callback gets passed to SSL_CTX_set_next_protos_advertise_cb */
23042304
static int
23052305
_advertiseNPN_cb(SSL *s,

0 commit comments

Comments
 (0)