@@ -259,11 +259,11 @@ static srtp_err_status_t srtp_aes_gcm_openssl_set_aad(void *cv,
259
259
srtp_octet_string_hex_string (aad , aad_len ));
260
260
261
261
if (c -> dir == srtp_direction_encrypt ) {
262
- if (EVP_EncryptUpdate (c -> ctx , NULL , & len , aad , aad_len ) != 1 ) {
262
+ if (EVP_EncryptUpdate (c -> ctx , NULL , & len , aad , ( int ) aad_len ) != 1 ) {
263
263
return srtp_err_status_algo_fail ;
264
264
}
265
265
} else {
266
- if (EVP_DecryptUpdate (c -> ctx , NULL , & len , aad , aad_len ) != 1 ) {
266
+ if (EVP_DecryptUpdate (c -> ctx , NULL , & len , aad , ( int ) aad_len ) != 1 ) {
267
267
return srtp_err_status_algo_fail ;
268
268
}
269
269
}
@@ -303,7 +303,7 @@ static srtp_err_status_t srtp_aes_gcm_openssl_encrypt(void *cv,
303
303
/*
304
304
* Encrypt the data
305
305
*/
306
- if (EVP_EncryptUpdate (c -> ctx , dst , & len , src , src_len ) != 1 ) {
306
+ if (EVP_EncryptUpdate (c -> ctx , dst , & len , src , ( int ) src_len ) != 1 ) {
307
307
return srtp_err_status_algo_fail ;
308
308
}
309
309
* dst_len = len ;
@@ -319,7 +319,7 @@ static srtp_err_status_t srtp_aes_gcm_openssl_encrypt(void *cv,
319
319
/*
320
320
* Retrieve the tag
321
321
*/
322
- if (EVP_CIPHER_CTX_ctrl (c -> ctx , EVP_CTRL_GCM_GET_TAG , c -> tag_len ,
322
+ if (EVP_CIPHER_CTX_ctrl (c -> ctx , EVP_CTRL_GCM_GET_TAG , ( int ) c -> tag_len ,
323
323
dst + * dst_len ) != 1 ) {
324
324
return srtp_err_status_algo_fail ;
325
325
}
@@ -360,7 +360,8 @@ static srtp_err_status_t srtp_aes_gcm_openssl_decrypt(void *cv,
360
360
/*
361
361
* Decrypt the data
362
362
*/
363
- if (EVP_DecryptUpdate (c -> ctx , dst , & len , src , src_len - c -> tag_len ) != 1 ) {
363
+ if (EVP_DecryptUpdate (c -> ctx , dst , & len , src ,
364
+ (int )(src_len - c -> tag_len )) != 1 ) {
364
365
return srtp_err_status_algo_fail ;
365
366
}
366
367
* dst_len = len ;
@@ -371,7 +372,7 @@ static srtp_err_status_t srtp_aes_gcm_openssl_decrypt(void *cv,
371
372
* explicitly cast away const of src
372
373
*/
373
374
if (EVP_CIPHER_CTX_ctrl (
374
- c -> ctx , EVP_CTRL_GCM_SET_TAG , c -> tag_len ,
375
+ c -> ctx , EVP_CTRL_GCM_SET_TAG , ( int ) c -> tag_len ,
375
376
(void * )(uintptr_t )(src + (src_len - c -> tag_len ))) != 1 ) {
376
377
return srtp_err_status_algo_fail ;
377
378
}
0 commit comments