Skip to content

Commit de59175

Browse files
committed
Add client hello callback related functions
This exposes the OpenSSL functions SSL_CTX_set_client_hello_cb, SSL_client_hello_get0_ext and SSL_client_hello_get1_extensions_present. These are required to implement to the client hello callback functionality in pyOpenSSL. Signed-off-by: Arne Schwabe <arne@rfc2549.org>
1 parent 23ef49c commit de59175

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/_cffi_src/openssl/ssl.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,18 @@
351351
void SSL_CTX_set_tlsext_servername_callback(
352352
SSL_CTX *,
353353
int (*)(SSL *, int *, void *));
354+
void SSL_CTX_set_client_hello_cb(
355+
SSL_CTX *c,
356+
int (*)(SSL *, int *, void *),
357+
void *arg);
358+
int SSL_client_hello_get1_extensions_present(
359+
SSL *s, int **out,
360+
size_t *outlen);
361+
int SSL_client_hello_get0_ext(
362+
SSL *s, unsigned int type,
363+
const unsigned char **out,
364+
size_t *outlen);
365+
354366
355367
long SSL_set_tlsext_status_ocsp_resp(SSL *, unsigned char *, int);
356368
long SSL_get_tlsext_status_ocsp_resp(SSL *, const unsigned char **);

0 commit comments

Comments
 (0)