(Auto)update libjingle 62550414-> 62691533

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5652 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
henrike@webrtc.org 2014-03-06 18:51:21 +00:00
parent f714e7faea
commit 2d213e450c
2 changed files with 11 additions and 9 deletions

View File

@ -27,14 +27,16 @@
#if defined(HAVE_SRTP) && defined(ENABLE_EXTERNAL_AUTH) #if defined(HAVE_SRTP) && defined(ENABLE_EXTERNAL_AUTH)
#include "talk/session/media/externalhmac.h"
#include <stdlib.h> // For malloc/free.
#ifdef SRTP_RELATIVE_PATH #ifdef SRTP_RELATIVE_PATH
#include "srtp.h" // NOLINT #include "srtp.h" // NOLINT
#else #else
#include "third_party/libsrtp/include/srtp.h" #include "third_party/libsrtp/include/srtp.h"
#endif // SRTP_RELATIVE_PATH #endif // SRTP_RELATIVE_PATH
#include "talk/session/media/externalhmac.h"
#include "talk/base/logging.h" #include "talk/base/logging.h"
// The debug module for authentiation // 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. // Allocate memory for auth and hmac_ctx_t structures.
pointer = reinterpret_cast<uint8_t*>( pointer = reinterpret_cast<uint8_t*>(
crypto_alloc(sizeof(external_hmac_ctx_t) + sizeof(auth_t))); malloc(sizeof(external_hmac_ctx_t) + sizeof(auth_t)));
if (pointer == NULL) if (pointer == NULL)
return err_status_alloc_fail; return err_status_alloc_fail;
@ -110,11 +112,10 @@ external_hmac_alloc(auth_t** a, int key_len, int out_len) {
err_status_t err_status_t
external_hmac_dealloc(auth_t* a) { external_hmac_dealloc(auth_t* a) {
// Zeroize entire state // Zeroize entire state
octet_string_set_to_zero((uint8_t *)a, memset((uint8_t *)a, sizeof(external_hmac_ctx_t) + sizeof(auth_t));
sizeof(external_hmac_ctx_t) + sizeof(auth_t));
// Free memory // Free memory
crypto_free(a); free(a);
// Decrement global count of all hmac uses. // Decrement global count of all hmac uses.
external_hmac.ref_count--; external_hmac.ref_count--;

View File

@ -46,10 +46,11 @@
// crypto_kernel_replace_auth_type function. // crypto_kernel_replace_auth_type function.
#if defined(HAVE_SRTP) && defined(ENABLE_EXTERNAL_AUTH) #if defined(HAVE_SRTP) && defined(ENABLE_EXTERNAL_AUTH)
#include "talk/base/basictypes.h"
#ifdef SRTP_RELATIVE_PATH #ifdef SRTP_RELATIVE_PATH
#include "crypto_types.h" // NOLINT #include "auth.h" // NOLINT
#else #else
#include "third_party/libsrtp/crypto/include/crypto_types.h" #include "third_party/libsrtp/crypto/include/auth.h"
#endif // SRTP_RELATIVE_PATH #endif // SRTP_RELATIVE_PATH
#define EXTERNAL_HMAC_SHA1 HMAC_SHA1 + 1 #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. // 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. // This pointer is owned by srtp_t in a template context.
typedef struct { typedef struct {
uint8_t key[HMAC_KEY_LENGTH]; uint8 key[HMAC_KEY_LENGTH];
int key_length; int key_length;
} external_hmac_ctx_t; } external_hmac_ctx_t;