summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--openssl-sys/src/srtp.rs6
-rw-r--r--openssl/src/srtp.rs4
2 files changed, 10 insertions, 0 deletions
diff --git a/openssl-sys/src/srtp.rs b/openssl-sys/src/srtp.rs
index d31aa06e..d39b2ab6 100644
--- a/openssl-sys/src/srtp.rs
+++ b/openssl-sys/src/srtp.rs
@@ -9,6 +9,12 @@ pub const SRTP_AES128_F8_SHA1_32: c_ulong = 0x0004;
pub const SRTP_NULL_SHA1_80: c_ulong = 0x0005;
pub const SRTP_NULL_SHA1_32: c_ulong = 0x0006;
+/* AEAD SRTP protection profiles from RFC 7714 */
+#[cfg(ossl110)]
+pub const SRTP_AEAD_AES_128_GCM: c_ulong = 0x0007;
+#[cfg(ossl110)]
+pub const SRTP_AEAD_AES_256_GCM: c_ulong = 0x0008;
+
extern "C" {
pub fn SSL_CTX_set_tlsext_use_srtp(ctx: *mut SSL_CTX, profiles: *const c_char) -> c_int;
pub fn SSL_set_tlsext_use_srtp(ssl: *mut SSL, profiles: *const c_char) -> c_int;
diff --git a/openssl/src/srtp.rs b/openssl/src/srtp.rs
index aef793c8..b5e38b7b 100644
--- a/openssl/src/srtp.rs
+++ b/openssl/src/srtp.rs
@@ -44,6 +44,10 @@ impl SrtpProfileId {
pub const SRTP_AES128_F8_SHA1_32: SrtpProfileId = SrtpProfileId(ffi::SRTP_AES128_F8_SHA1_32);
pub const SRTP_NULL_SHA1_80: SrtpProfileId = SrtpProfileId(ffi::SRTP_NULL_SHA1_80);
pub const SRTP_NULL_SHA1_32: SrtpProfileId = SrtpProfileId(ffi::SRTP_NULL_SHA1_32);
+ #[cfg(ossl110)]
+ pub const SRTP_AEAD_AES_128_GCM: SrtpProfileId = SrtpProfileId(ffi::SRTP_AEAD_AES_128_GCM);
+ #[cfg(ossl110)]
+ pub const SRTP_AEAD_AES_256_GCM: SrtpProfileId = SrtpProfileId(ffi::SRTP_AEAD_AES_256_GCM);
/// Creates a `SrtpProfileId` from an integer representation.
pub fn from_raw(value: c_ulong) -> SrtpProfileId {