From 2d213e450cb96f6223fd9aed20768068ba2b88f9 Mon Sep 17 00:00:00 2001 From: "henrike@webrtc.org" Date: Thu, 6 Mar 2014 18:51:21 +0000 Subject: [PATCH] (Auto)update libjingle 62550414-> 62691533 git-svn-id: http://webrtc.googlecode.com/svn/trunk@5652 4adac7df-926f-26a2-2b94-8c16560cd09d --- talk/session/media/externalhmac.cc | 13 +++++++------ talk/session/media/externalhmac.h | 7 ++++--- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/talk/session/media/externalhmac.cc b/talk/session/media/externalhmac.cc index 69d44b6a69..a7b62c3185 100644 --- a/talk/session/media/externalhmac.cc +++ b/talk/session/media/externalhmac.cc @@ -27,14 +27,16 @@ #if defined(HAVE_SRTP) && defined(ENABLE_EXTERNAL_AUTH) +#include "talk/session/media/externalhmac.h" + +#include // For malloc/free. + #ifdef SRTP_RELATIVE_PATH #include "srtp.h" // NOLINT #else #include "third_party/libsrtp/include/srtp.h" #endif // SRTP_RELATIVE_PATH -#include "talk/session/media/externalhmac.h" - #include "talk/base/logging.h" // The debug module for authentiation @@ -89,7 +91,7 @@ external_hmac_alloc(auth_t** a, int key_len, int out_len) { // Allocate memory for auth and hmac_ctx_t structures. pointer = reinterpret_cast( - crypto_alloc(sizeof(external_hmac_ctx_t) + sizeof(auth_t))); + malloc(sizeof(external_hmac_ctx_t) + sizeof(auth_t))); if (pointer == NULL) return err_status_alloc_fail; @@ -110,11 +112,10 @@ external_hmac_alloc(auth_t** a, int key_len, int out_len) { err_status_t external_hmac_dealloc(auth_t* a) { // Zeroize entire state - octet_string_set_to_zero((uint8_t *)a, - sizeof(external_hmac_ctx_t) + sizeof(auth_t)); + memset((uint8_t *)a, sizeof(external_hmac_ctx_t) + sizeof(auth_t)); // Free memory - crypto_free(a); + free(a); // Decrement global count of all hmac uses. external_hmac.ref_count--; diff --git a/talk/session/media/externalhmac.h b/talk/session/media/externalhmac.h index 47a195faa8..62a660c924 100644 --- a/talk/session/media/externalhmac.h +++ b/talk/session/media/externalhmac.h @@ -46,10 +46,11 @@ // crypto_kernel_replace_auth_type function. #if defined(HAVE_SRTP) && defined(ENABLE_EXTERNAL_AUTH) +#include "talk/base/basictypes.h" #ifdef SRTP_RELATIVE_PATH -#include "crypto_types.h" // NOLINT +#include "auth.h" // NOLINT #else -#include "third_party/libsrtp/crypto/include/crypto_types.h" +#include "third_party/libsrtp/crypto/include/auth.h" #endif // SRTP_RELATIVE_PATH #define EXTERNAL_HMAC_SHA1 HMAC_SHA1 + 1 @@ -59,7 +60,7 @@ // The pointer to the key will be allocated in the external_hmac_init function. // This pointer is owned by srtp_t in a template context. typedef struct { - uint8_t key[HMAC_KEY_LENGTH]; + uint8 key[HMAC_KEY_LENGTH]; int key_length; } external_hmac_ctx_t;