diff options
author | Daiki Ueno <ueno@gnu.org> | 2023-01-06 11:07:38 +0000 |
---|---|---|
committer | Daiki Ueno <ueno@gnu.org> | 2023-01-06 11:07:38 +0000 |
commit | 4e5afffcba3e5f898eca7c450408605969135d48 (patch) | |
tree | 29b4e8560401a426bae460e554ffd69772557ba8 | |
parent | ae89e0e3b8b52c8bd4e8fd4c62d9dfa9d69e96b9 (diff) | |
parent | 010ea4d24206c8671a3d6a63e7d7e54406fd50bc (diff) | |
download | gnutls-4e5afffcba3e5f898eca7c450408605969135d48.tar.gz |
Merge branch 'wip/dueno/srtp' into 'master'
srtp: support AES-GCM profiles
Closes #1266
See merge request gnutls/gnutls!1685
-rw-r--r-- | NEWS | 2 | ||||
-rw-r--r-- | devel/libgnutls.abignore | 3 | ||||
-rw-r--r-- | lib/ext/srtp.c | 38 | ||||
-rw-r--r-- | lib/includes/gnutls/gnutls.h.in | 6 |
4 files changed, 36 insertions, 13 deletions
@@ -31,6 +31,8 @@ and to simplify maintenance, see <https://gitlab.com/gnutls/guile/>. ** API and ABI modifications: GNUTLS_NO_STATUS_REQUEST: New flag +GNUTLS_SRTP_AEAD_AES_128_GCM: New gnutls_srtp_profile_t enum member +GNUTLS_SRTP_AEAD_AES_256_GCM: New gnutls_srtp_profile_t enum member * Version 3.7.8 (released 2022-09-27) diff --git a/devel/libgnutls.abignore b/devel/libgnutls.abignore index c19dce38e1..d55e828cfd 100644 --- a/devel/libgnutls.abignore +++ b/devel/libgnutls.abignore @@ -70,3 +70,6 @@ name = drbg_aes_reseed # The following should be removed in the new release, after updating the # abi-dump repository: +[suppress_type] +name = gnutls_srtp_profile_t +changed_enumerators = GNUTLS_SRTP_AEAD_AES_128_GCM, GNUTLS_SRTP_AEAD_AES_256_GCM
\ No newline at end of file diff --git a/lib/ext/srtp.c b/lib/ext/srtp.c index b2e36b3a06..ec9ae31acb 100644 --- a/lib/ext/srtp.c +++ b/lib/ext/srtp.c @@ -64,21 +64,35 @@ typedef struct { static const srtp_profile_st profile_names[] = { { - "SRTP_AES128_CM_HMAC_SHA1_80", - GNUTLS_SRTP_AES128_CM_HMAC_SHA1_80, - 16, 14}, + "SRTP_AES128_CM_HMAC_SHA1_80", + GNUTLS_SRTP_AES128_CM_HMAC_SHA1_80, + 16, 14 + }, { - "SRTP_AES128_CM_HMAC_SHA1_32", - GNUTLS_SRTP_AES128_CM_HMAC_SHA1_32, - 16, 14}, + "SRTP_AES128_CM_HMAC_SHA1_32", + GNUTLS_SRTP_AES128_CM_HMAC_SHA1_32, + 16, 14 + }, { - "SRTP_NULL_HMAC_SHA1_80", - GNUTLS_SRTP_NULL_HMAC_SHA1_80, - 16, 14}, + "SRTP_NULL_HMAC_SHA1_80", + GNUTLS_SRTP_NULL_HMAC_SHA1_80, + 16, 14 + }, { - "SRTP_NULL_SHA1_32", - GNUTLS_SRTP_NULL_HMAC_SHA1_32, - 16, 14}, + "SRTP_NULL_SHA1_32", + GNUTLS_SRTP_NULL_HMAC_SHA1_32, + 16, 14 + }, + { + "SRTP_AEAD_AES_128_GCM", + GNUTLS_SRTP_AEAD_AES_128_GCM, + 16, 12 + }, + { + "SRTP_AEAD_AES_256_GCM", + GNUTLS_SRTP_AEAD_AES_256_GCM, + 32, 12 + }, { NULL, 0, 0, 0} diff --git a/lib/includes/gnutls/gnutls.h.in b/lib/includes/gnutls/gnutls.h.in index 830ce5f95c..bbb4336ae9 100644 --- a/lib/includes/gnutls/gnutls.h.in +++ b/lib/includes/gnutls/gnutls.h.in @@ -1704,6 +1704,8 @@ int gnutls_session_ticket_send(gnutls_session_t session, unsigned nr, unsigned f * @GNUTLS_SRTP_AES128_CM_HMAC_SHA1_32: 128 bit AES with a 32 bit HMAC-SHA1 * @GNUTLS_SRTP_NULL_HMAC_SHA1_80: NULL cipher with a 80 bit HMAC-SHA1 * @GNUTLS_SRTP_NULL_HMAC_SHA1_32: NULL cipher with a 32 bit HMAC-SHA1 + * @GNUTLS_SRTP_AEAD_AES_128_GCM: 128 bit AES with GCM + * @GNUTLS_SRTP_AEAD_AES_256_GCM: 256 bit AES with GCM * * Enumeration of different SRTP protection profiles. */ @@ -1711,7 +1713,9 @@ typedef enum { GNUTLS_SRTP_AES128_CM_HMAC_SHA1_80 = 0x0001, GNUTLS_SRTP_AES128_CM_HMAC_SHA1_32 = 0x0002, GNUTLS_SRTP_NULL_HMAC_SHA1_80 = 0x0005, - GNUTLS_SRTP_NULL_HMAC_SHA1_32 = 0x0006 + GNUTLS_SRTP_NULL_HMAC_SHA1_32 = 0x0006, + GNUTLS_SRTP_AEAD_AES_128_GCM = 0x0007, + GNUTLS_SRTP_AEAD_AES_256_GCM = 0x0008 } gnutls_srtp_profile_t; int gnutls_srtp_set_profile(gnutls_session_t session, |