Skip to content

Commit

Permalink
optimize: make it compatible with boringssl. (#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhuizhuhaomeng authored Nov 18, 2021
1 parent c70b80b commit 0f81b57
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/ngx_http_encrypted_session_cipher.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ ngx_http_encrypted_session_aes_mac_encrypt(

p += len;

ret = EVP_EncryptFinal(emcf->session_ctx, p, &len);
ret = EVP_EncryptFinal_ex(emcf->session_ctx, p, &len);

emcf->reset_cipher_ctx(emcf->session_ctx);

Expand Down Expand Up @@ -180,7 +180,7 @@ ngx_http_encrypted_session_aes_mac_decrypt(
block_size = EVP_CIPHER_block_size(cipher);

buf_size = in_len + block_size /* for EVP_DecryptUpdate */
+ block_size; /* for EVP_DecryptFinal */
+ block_size; /* for EVP_DecryptFinal_ex */

p = ngx_palloc(pool, buf_size);
if (p == NULL) {
Expand All @@ -199,7 +199,7 @@ ngx_http_encrypted_session_aes_mac_decrypt(

p += len;

ret = EVP_DecryptFinal(emcf->session_ctx, p, &len);
ret = EVP_DecryptFinal_ex(emcf->session_ctx, p, &len);

emcf->reset_cipher_ctx(emcf->session_ctx);

Expand Down

0 comments on commit 0f81b57

Please sign in to comment.