Rename external_hmac_ctx_t to ExternalHmacContext.
_t types are reserved by POSIX. R=juberti@webrtc.org BUG=162 Review URL: https://webrtc-codereview.appspot.com/33699004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@7944 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
e468bc9e60
commit
a9cf079248
@ -98,7 +98,7 @@ err_status_t external_hmac_alloc(auth_t** a, int key_len, int out_len) {
|
||||
return err_status_bad_param;
|
||||
|
||||
// Allocate memory for auth and hmac_ctx_t structures.
|
||||
pointer = new uint8_t[(sizeof(external_hmac_ctx_t) + sizeof(auth_t))];
|
||||
pointer = new uint8_t[(sizeof(ExternalHmacContext) + sizeof(auth_t))];
|
||||
if (pointer == NULL)
|
||||
return err_status_alloc_fail;
|
||||
|
||||
@ -118,7 +118,7 @@ err_status_t external_hmac_alloc(auth_t** a, int key_len, int out_len) {
|
||||
|
||||
err_status_t external_hmac_dealloc(auth_t* a) {
|
||||
// Zeroize entire state
|
||||
memset((uint8_t *)a, 0, sizeof(external_hmac_ctx_t) + sizeof(auth_t));
|
||||
memset((uint8_t *)a, 0, sizeof(ExternalHmacContext) + sizeof(auth_t));
|
||||
|
||||
// Free memory
|
||||
delete[] a;
|
||||
@ -126,7 +126,7 @@ err_status_t external_hmac_dealloc(auth_t* a) {
|
||||
return err_status_ok;
|
||||
}
|
||||
|
||||
err_status_t external_hmac_init(external_hmac_ctx_t* state,
|
||||
err_status_t external_hmac_init(ExternalHmacContext* state,
|
||||
const uint8_t* key,
|
||||
int key_len) {
|
||||
if (key_len > HMAC_KEY_LENGTH)
|
||||
@ -138,17 +138,17 @@ err_status_t external_hmac_init(external_hmac_ctx_t* state,
|
||||
return err_status_ok;
|
||||
}
|
||||
|
||||
err_status_t external_hmac_start(external_hmac_ctx_t* state) {
|
||||
err_status_t external_hmac_start(ExternalHmacContext* state) {
|
||||
return err_status_ok;
|
||||
}
|
||||
|
||||
err_status_t external_hmac_update(external_hmac_ctx_t* state,
|
||||
err_status_t external_hmac_update(ExternalHmacContext* state,
|
||||
const uint8_t* message,
|
||||
int msg_octets) {
|
||||
return err_status_ok;
|
||||
}
|
||||
|
||||
err_status_t external_hmac_compute(external_hmac_ctx_t* state,
|
||||
err_status_t external_hmac_compute(ExternalHmacContext* state,
|
||||
const void* message,
|
||||
int msg_octets,
|
||||
int tag_len,
|
||||
|
@ -62,23 +62,23 @@
|
||||
typedef struct {
|
||||
uint8 key[HMAC_KEY_LENGTH];
|
||||
int key_length;
|
||||
} external_hmac_ctx_t;
|
||||
} ExternalHmacContext;
|
||||
|
||||
err_status_t external_hmac_alloc(auth_t** a, int key_len, int out_len);
|
||||
|
||||
err_status_t external_hmac_dealloc(auth_t* a);
|
||||
|
||||
err_status_t external_hmac_init(external_hmac_ctx_t* state,
|
||||
err_status_t external_hmac_init(ExternalHmacContext* state,
|
||||
const uint8_t* key,
|
||||
int key_len);
|
||||
|
||||
err_status_t external_hmac_start(external_hmac_ctx_t* state);
|
||||
err_status_t external_hmac_start(ExternalHmacContext* state);
|
||||
|
||||
err_status_t external_hmac_update(external_hmac_ctx_t* state,
|
||||
err_status_t external_hmac_update(ExternalHmacContext* state,
|
||||
const uint8_t* message,
|
||||
int msg_octets);
|
||||
|
||||
err_status_t external_hmac_compute(external_hmac_ctx_t* state,
|
||||
err_status_t external_hmac_compute(ExternalHmacContext* state,
|
||||
const void* message,
|
||||
int msg_octets,
|
||||
int tag_len,
|
||||
|
@ -598,12 +598,12 @@ bool SrtpSession::UnprotectRtcp(void* p, int in_len, int* out_len) {
|
||||
bool SrtpSession::GetRtpAuthParams(uint8** key, int* key_len,
|
||||
int* tag_len) {
|
||||
#if defined(ENABLE_EXTERNAL_AUTH)
|
||||
external_hmac_ctx_t* external_hmac = NULL;
|
||||
ExternalHmacContext* external_hmac = NULL;
|
||||
// stream_template will be the reference context for other streams.
|
||||
// Let's use it for getting the keys.
|
||||
srtp_stream_ctx_t* srtp_context = session_->stream_template;
|
||||
if (srtp_context && srtp_context->rtp_auth) {
|
||||
external_hmac = reinterpret_cast<external_hmac_ctx_t*>(
|
||||
external_hmac = reinterpret_cast<ExternalHmacContext*>(
|
||||
srtp_context->rtp_auth->state);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user