summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorzuul <zuul@gerrit.asterisk.org>2016-07-21 21:11:07 -0500
committerGerrit Code Review <gerrit2@gerrit.digium.api>2016-07-21 21:11:07 -0500
commit947381865918f7c560cfe69d79ab7db6f0aa4cc5 (patch)
treedc502e28757fa474064b17d36b98211c42cd47bc /include
parent9372fe1b9579b27c59dc3a1a203a3e4307db653a (diff)
parent1d2173c7aed0587cdd434e69e89a3972a2642cd8 (diff)
Merge "res_srtp: Enable AES-256 and AES-GCM."
Diffstat (limited to 'include')
-rw-r--r--include/asterisk/autoconfig.h.in10
-rw-r--r--include/asterisk/res_srtp.h14
-rw-r--r--include/asterisk/sdp_srtp.h18
3 files changed, 34 insertions, 8 deletions
diff --git a/include/asterisk/autoconfig.h.in b/include/asterisk/autoconfig.h.in
index 9d2a84c02..b48257ec0 100644
--- a/include/asterisk/autoconfig.h.in
+++ b/include/asterisk/autoconfig.h.in
@@ -841,6 +841,16 @@
/* Define to 1 if you have the Secure RTP library. */
#undef HAVE_SRTP
+/* Define to 1 if SRTP has the SRTP Library AES-192 (ICM) feature. */
+#undef HAVE_SRTP_192
+
+/* Define to 1 if SRTP has the SRTP Library AES-256 (ICM) feature. */
+#undef HAVE_SRTP_256
+
+/* Define to 1 if SRTP has the SRTP Library AES-128 (GCM) and AES-256 (GCM)
+ feature. */
+#undef HAVE_SRTP_GCM
+
/* Define to 1 if SRTP has the SRTP Library Shutdown Function feature. */
#undef HAVE_SRTP_SHUTDOWN
diff --git a/include/asterisk/res_srtp.h b/include/asterisk/res_srtp.h
index c7fdc40b7..741d4f9ac 100644
--- a/include/asterisk/res_srtp.h
+++ b/include/asterisk/res_srtp.h
@@ -21,6 +21,8 @@
#ifndef _ASTERISK_RES_SRTP_H
#define _ASTERISK_RES_SRTP_H
+#include "asterisk.h" /* for size_t */
+
struct ast_srtp;
struct ast_srtp_policy;
struct ast_rtp_instance;
@@ -52,9 +54,17 @@ struct ast_srtp_res {
/* Crypto suites */
enum ast_srtp_suite {
+ /* https://www.iana.org/assignments/srtp-protection/srtp-protection.xhtml */
AST_AES_CM_128_HMAC_SHA1_80 = 1,
- AST_AES_CM_128_HMAC_SHA1_32 = 2,
- AST_F8_128_HMAC_SHA1_80 = 3
+ AST_AES_CM_128_HMAC_SHA1_32,
+ AST_AES_CM_256_HMAC_SHA1_80,
+ AST_AES_CM_256_HMAC_SHA1_32,
+ AST_AES_GCM_128 = 7,
+ AST_AES_GCM_256,
+ AST_AES_GCM_128_8,
+ AST_AES_GCM_256_8,
+ AST_AES_CM_192_HMAC_SHA1_80,
+ AST_AES_CM_192_HMAC_SHA1_32,
};
struct ast_srtp_policy_res {
diff --git a/include/asterisk/sdp_srtp.h b/include/asterisk/sdp_srtp.h
index 772c3c38d..5d8f0e7d1 100644
--- a/include/asterisk/sdp_srtp.h
+++ b/include/asterisk/sdp_srtp.h
@@ -20,8 +20,7 @@
*
* \brief SRTP and SDP Security descriptions
*
- * Specified in RFC 4568
- * Specified in RFC 3711
+ * Specified in RFC 3711, 6188, 7714, and 4568
*
* \author Mikael Magnusson <mikma@users.sourceforge.net>
*/
@@ -29,7 +28,8 @@
#ifndef _SDP_SRTP_H
#define _SDP_SRTP_H
-#include <asterisk/rtp_engine.h>
+#include "asterisk/linkedlists.h" /* for AST_LIST_ENTRY */
+#include "asterisk/rtp_engine.h" /* for ast_rtp_instance */
struct ast_sdp_crypto;
@@ -37,12 +37,18 @@ struct ast_sdp_crypto;
struct ast_sdp_srtp {
unsigned int flags;
struct ast_sdp_crypto *crypto;
+ AST_LIST_ENTRY(ast_sdp_srtp) sdp_srtp_list;
};
/* SRTP flags */
-#define AST_SRTP_CRYPTO_OFFER_OK (1 << 1)
-#define AST_SRTP_CRYPTO_TAG_32 (1 << 2)
-#define AST_SRTP_CRYPTO_TAG_80 (1 << 3)
+#define AST_SRTP_CRYPTO_OFFER_OK (1 << 1)
+#define AST_SRTP_CRYPTO_TAG_32 (1 << 2)
+#define AST_SRTP_CRYPTO_TAG_80 (1 << 3)
+#define AST_SRTP_CRYPTO_TAG_16 (1 << 4)
+#define AST_SRTP_CRYPTO_TAG_8 (1 << 5)
+#define AST_SRTP_CRYPTO_AES_192 (1 << 6)
+#define AST_SRTP_CRYPTO_AES_256 (1 << 7)
+#define AST_SRTP_CRYPTO_OLD_NAME (1 << 8)
/*!
* \brief allocate a ast_sdp_srtp structure