Commit bb07732d authored by David McGrew's avatar David McGrew

fixed some nits and compiler warnings

parent 5506a8b7
......@@ -564,7 +564,7 @@ cryptoalg_find_by_id(int id) {
case 1:
return cryptoalg;
default:
return 0;
break;
}
return 0;
}
......@@ -98,12 +98,14 @@ aes_icm_alloc_ismacryp(cipher_t **c, int key_len, int forIsmacryp) {
debug_print(mod_aes_icm,
"allocating cipher with key length %d", key_len);
// Ismacryp, for example, uses 16 byte key + 8 byte
// salt so this function is called with key_len = 24.
// The check for key_len = 30 does not apply. Our usage
// of aes functions with key_len = values other than 30
// has not broken anything. Don't know what would be the
// effect of skipping this check for srtp in general.
/*
* Ismacryp, for example, uses 16 byte key + 8 byte
* salt so this function is called with key_len = 24.
* The check for key_len = 30 does not apply. Our usage
* of aes functions with key_len = values other than 30
* has not broken anything. Don't know what would be the
* effect of skipping this check for srtp in general.
*/
if (!forIsmacryp && key_len != 30)
return err_status_bad_param;
......
......@@ -57,7 +57,6 @@ err_status_t
hmac_alloc(auth_t **a, int key_len, int out_len) {
extern auth_type_t hmac;
uint8_t *pointer;
hmac_ctx_t *new_hmac_ctx;
debug_print(mod_hmac, "allocating auth func with key length %d", key_len);
debug_print(mod_hmac, " tag length %d", out_len);
......@@ -85,7 +84,6 @@ hmac_alloc(auth_t **a, int key_len, int out_len) {
(*a)->out_len = out_len;
(*a)->key_len = key_len;
(*a)->prefix_len = 0;
new_hmac_ctx = (hmac_ctx_t *)((*a)->state);
/* increment global count of all hmac uses */
hmac.ref_count++;
......
......@@ -90,7 +90,7 @@ typedef enum {
err_status_parse_err = 21, /**< error pasring data */
err_status_encode_err = 22, /**< error encoding data */
err_status_semaphore_err = 23,/**< error while using semaphores */
err_status_pfkey_err = 24 ,/**< error while using pfkey */
err_status_pfkey_err = 24 /**< error while using pfkey */
} err_status_t;
/**
......
......@@ -113,7 +113,7 @@ extern uint32_t low32(uint64_t value);
addresses. This is required for processors that do not allow unaligned
loads. */
#ifdef ALIGNMENT_32BIT_REQUIRED
// Note that if it's in a variable, you can memcpy it
/* Note that if it's in a variable, you can memcpy it */
#ifdef WORDS_BIGENDIAN
#define PUT_32(addr,value) \
{ \
......
......@@ -565,7 +565,7 @@ base64_char_to_sextet(uint8_t c) {
case '=':
return 64;
default:
return -1;
break;
}
return -1;
}
......
......@@ -813,7 +813,7 @@ srtp_unprotect(srtp_ctx_t *ctx, void *srtp_hdr, int *pkt_octet_len) {
srtp_hdr_t *hdr = (srtp_hdr_t *)srtp_hdr;
uint32_t *enc_start; /* pointer to start of encrypted portion */
uint32_t *auth_start; /* pointer to start of auth. portion */
uint32_t enc_octet_len = 0;/* number of octets in encrypted portion */
unsigned enc_octet_len = 0;/* number of octets in encrypted portion */
uint8_t *auth_tag = NULL; /* location of auth_tag within packet */
xtd_seq_num_t est; /* estimated xtd_seq_num_t of *hdr */
int delta; /* delta of local pkt idx and that in hdr */
......@@ -1422,7 +1422,7 @@ srtp_protect_rtcp(srtp_t ctx, void *rtcp_hdr, int *pkt_octet_len) {
uint32_t *enc_start; /* pointer to start of encrypted portion */
uint32_t *auth_start; /* pointer to start of auth. portion */
uint32_t *trailer; /* pointer to start of trailer */
uint32_t enc_octet_len = 0;/* number of octets in encrypted portion */
unsigned enc_octet_len = 0;/* number of octets in encrypted portion */
uint8_t *auth_tag = NULL; /* location of auth_tag within packet */
err_status_t status;
int tag_len;
......@@ -1601,7 +1601,7 @@ srtp_unprotect_rtcp(srtp_t ctx, void *srtcp_hdr, int *pkt_octet_len) {
uint32_t *enc_start; /* pointer to start of encrypted portion */
uint32_t *auth_start; /* pointer to start of auth. portion */
uint32_t *trailer; /* pointer to start of trailer */
uint32_t enc_octet_len = 0;/* number of octets in encrypted portion */
unsigned enc_octet_len = 0;/* number of octets in encrypted portion */
uint8_t *auth_tag = NULL; /* location of auth_tag within packet */
uint8_t tmp_tag[SRTP_MAX_TAG_LEN];
err_status_t status;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment