diff options
author | Nanang Izzuddin <nanang@teluu.com> | 2016-03-15 03:57:39 +0000 |
---|---|---|
committer | Nanang Izzuddin <nanang@teluu.com> | 2016-03-15 03:57:39 +0000 |
commit | 26d978a556ae9099f6610ace9834991636e4a71b (patch) | |
tree | d8789c5afbe3920f3f7ef46ad73aa34f48173591 /third_party/srtp/crypto/hash/auth.c | |
parent | 8b9358503884ec1901d807ff56c2fc588be896a2 (diff) |
Close #1847: Upgraded libsrtp version to 1.5.4 and added support for AES-CM-256 crypto.
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@5261 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'third_party/srtp/crypto/hash/auth.c')
-rw-r--r-- | third_party/srtp/crypto/hash/auth.c | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/third_party/srtp/crypto/hash/auth.c b/third_party/srtp/crypto/hash/auth.c index 8eb722d0..4ca0f03e 100644 --- a/third_party/srtp/crypto/hash/auth.c +++ b/third_party/srtp/crypto/hash/auth.c @@ -43,6 +43,10 @@ * */ +#ifdef HAVE_CONFIG_H + #include <config.h> +#endif + #include "auth.h" /* the debug module for authentiation */ @@ -74,8 +78,8 @@ auth_type_get_ref_count(const auth_type_t *at) { } /* - * auth_type_self_test() tests an auth function of type ct against - * test cases provided in an array of values of key, data, and tag + * auth_type_test() tests an auth function of type ct against + * test cases provided in a list test_data of values of key, data, and tag * that is known to be good */ @@ -83,8 +87,8 @@ auth_type_get_ref_count(const auth_type_t *at) { #define SELF_TEST_TAG_BUF_OCTETS 32 err_status_t -auth_type_self_test(const auth_type_t *at) { - auth_test_case_t *test_case = at->test_data; +auth_type_test(const auth_type_t *at, const auth_test_case_t *test_data) { + const auth_test_case_t *test_case = test_data; auth_t *a; err_status_t status; uint8_t tag[SELF_TEST_TAG_BUF_OCTETS]; @@ -171,3 +175,13 @@ auth_type_self_test(const auth_type_t *at) { } +/* + * auth_type_self_test(at) performs auth_type_test on at's internal + * list of test data. + */ + +err_status_t +auth_type_self_test(const auth_type_t *at) { + return auth_type_test(at, at->test_data); +} + |