aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Lainé <jeremy.laine@m4x.org>2019-01-11 18:46:16 +0100
committerPaul Kehrer <paul.l.kehrer@gmail.com>2019-01-11 09:46:16 -0800
commit19b5d248f2122ace443d2d3596f9dd14f78a4d30 (patch)
treeb391ed80ed502f9d0e278a98a39277b8af8ffd0d
parent60f264b0f293bfded7a0b4395715669d355a6185 (diff)
downloadcryptography-19b5d248f2122ace443d2d3596f9dd14f78a4d30.tar.gz
cryptography-19b5d248f2122ace443d2d3596f9dd14f78a4d30.tar.bz2
cryptography-19b5d248f2122ace443d2d3596f9dd14f78a4d30.zip
Add bindings to get SRTP protection profile (#4679)
This adds the ability to retrieve the selected SRTP protection profile after the DTLS handshake completes. This is needed to perform the correct key derivation if multiple profiles were offered.
-rw-r--r--src/_cffi_src/openssl/ssl.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/_cffi_src/openssl/ssl.py b/src/_cffi_src/openssl/ssl.py
index 82639a5d..2218095c 100644
--- a/src/_cffi_src/openssl/ssl.py
+++ b/src/_cffi_src/openssl/ssl.py
@@ -154,6 +154,11 @@ static const long TLSEXT_STATUSTYPE_ocsp;
typedef ... SSL_CIPHER;
typedef ... Cryptography_STACK_OF_SSL_CIPHER;
typedef ... COMP_METHOD;
+
+typedef struct {
+ const char *name;
+ unsigned long id;
+} SRTP_PROTECTION_PROFILE;
"""
FUNCTIONS = """
@@ -423,6 +428,7 @@ long SSL_CTX_set_tlsext_status_arg(SSL_CTX *, void *);
int SSL_CTX_set_tlsext_use_srtp(SSL_CTX *, const char *);
int SSL_set_tlsext_use_srtp(SSL *, const char *);
+SRTP_PROTECTION_PROFILE *SSL_get_selected_srtp_profile(SSL *);
long SSL_session_reused(SSL *);