More renaming to match library name. Fix linker failure for env target.
diff --git a/crypto/Makefile.in b/crypto/Makefile.in
index e421e54..9cef200 100644
--- a/crypto/Makefile.in
+++ b/crypto/Makefile.in
@@ -16,7 +16,7 @@
LIBS = @LIBS@
LDFLAGS = @LDFLAGS@ -L. -L..
COMPILE = $(CC) $(DEFS) $(INCDIR) $(CPPFLAGS) $(CFLAGS)
-CRYPTOLIB = -lsrtp
+CRYPTOLIB = -lsrtp2
RANLIB = @RANLIB@
diff --git a/crypto/cipher/aes_icm.c b/crypto/cipher/aes_icm.c
index 8d4da00..76a8a27 100644
--- a/crypto/cipher/aes_icm.c
+++ b/crypto/cipher/aes_icm.c
@@ -115,7 +115,7 @@
}
/* allocate memory a cipher of type aes_icm */
- tmp = (sizeof(aes_icm_ctx_t) + sizeof(srtp_cipher_t));
+ tmp = (sizeof(srtp_aes_icm_ctx_t) + sizeof(srtp_cipher_t));
pointer = (uint8_t*)srtp_crypto_alloc(tmp);
if (pointer == NULL) {
return srtp_err_status_alloc_fail;
@@ -152,7 +152,7 @@
{
/* zeroize entire state*/
octet_string_set_to_zero((uint8_t*)c,
- sizeof(aes_icm_ctx_t) + sizeof(srtp_cipher_t));
+ sizeof(srtp_aes_icm_ctx_t) + sizeof(srtp_cipher_t));
/* free memory */
srtp_crypto_free(c);
@@ -171,7 +171,7 @@
* randomizes the starting point in the keystream
*/
-static srtp_err_status_t srtp_aes_icm_context_init (aes_icm_ctx_t *c, const uint8_t *key, int key_len)
+static srtp_err_status_t srtp_aes_icm_context_init (srtp_aes_icm_ctx_t *c, const uint8_t *key, int key_len)
{
srtp_err_status_t status;
int base_key_len, copy_len;
@@ -224,7 +224,7 @@
* the offset
*/
-static srtp_err_status_t srtp_aes_icm_set_iv (aes_icm_ctx_t *c, void *iv, int direction)
+static srtp_err_status_t srtp_aes_icm_set_iv (srtp_aes_icm_ctx_t *c, void *iv, int direction)
{
v128_t nonce;
@@ -253,7 +253,7 @@
*
* this is an internal, hopefully inlined function
*/
-static void srtp_aes_icm_advance_ismacryp (aes_icm_ctx_t *c, uint8_t forIsmacryp)
+static void srtp_aes_icm_advance_ismacryp (srtp_aes_icm_ctx_t *c, uint8_t forIsmacryp)
{
/* fill buffer with new keystream */
v128_copy(&c->keystream_buffer, &c->counter);
@@ -293,7 +293,7 @@
* - fill buffer then add in remaining (< 16) bytes of keystream
*/
-static srtp_err_status_t srtp_aes_icm_encrypt_ismacryp (aes_icm_ctx_t *c,
+static srtp_err_status_t srtp_aes_icm_encrypt_ismacryp (srtp_aes_icm_ctx_t *c,
unsigned char *buf, unsigned int *enc_len,
int forIsmacryp)
{
@@ -403,7 +403,7 @@
return srtp_err_status_ok;
}
-static srtp_err_status_t srtp_aes_icm_encrypt (aes_icm_ctx_t *c, unsigned char *buf, unsigned int *enc_len)
+static srtp_err_status_t srtp_aes_icm_encrypt (srtp_aes_icm_ctx_t *c, unsigned char *buf, unsigned int *enc_len)
{
return srtp_aes_icm_encrypt_ismacryp(c, buf, enc_len, 0);
}
diff --git a/crypto/include/aes_icm.h b/crypto/include/aes_icm.h
index c263d62..1617a87 100644
--- a/crypto/include/aes_icm.h
+++ b/crypto/include/aes_icm.h
@@ -20,7 +20,7 @@
v128_t keystream_buffer; /* buffers bytes of keystream */
srtp_aes_expanded_key_t expanded_key; /* the cipher key */
int bytes_in_buffer; /* number of unused bytes in buffer */
-} aes_icm_ctx_t;
+} srtp_aes_icm_ctx_t;
#endif /* AES_ICM_H */