@@ -259,11 +259,11 @@ static srtp_err_status_t srtp_aes_gcm_openssl_set_aad(void *cv,
259259 srtp_octet_string_hex_string (aad , aad_len ));
260260
261261 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 ) {
263263 return srtp_err_status_algo_fail ;
264264 }
265265 } 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 ) {
267267 return srtp_err_status_algo_fail ;
268268 }
269269 }
@@ -303,7 +303,7 @@ static srtp_err_status_t srtp_aes_gcm_openssl_encrypt(void *cv,
303303 /*
304304 * Encrypt the data
305305 */
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 ) {
307307 return srtp_err_status_algo_fail ;
308308 }
309309 * dst_len = len ;
@@ -319,7 +319,7 @@ static srtp_err_status_t srtp_aes_gcm_openssl_encrypt(void *cv,
319319 /*
320320 * Retrieve the tag
321321 */
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 ,
323323 dst + * dst_len ) != 1 ) {
324324 return srtp_err_status_algo_fail ;
325325 }
@@ -360,7 +360,8 @@ static srtp_err_status_t srtp_aes_gcm_openssl_decrypt(void *cv,
360360 /*
361361 * Decrypt the data
362362 */
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 ) {
364365 return srtp_err_status_algo_fail ;
365366 }
366367 * dst_len = len ;
@@ -371,7 +372,7 @@ static srtp_err_status_t srtp_aes_gcm_openssl_decrypt(void *cv,
371372 * explicitly cast away const of src
372373 */
373374 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 ,
375376 (void * )(uintptr_t )(src + (src_len - c -> tag_len ))) != 1 ) {
376377 return srtp_err_status_algo_fail ;
377378 }
0 commit comments