Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsoleni...@linaro.org>
---
 platform/linux-generic/odp_crypto.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/platform/linux-generic/odp_crypto.c 
b/platform/linux-generic/odp_crypto.c
index 3deec7de3f7c..ff3f1ac76780 100644
--- a/platform/linux-generic/odp_crypto.c
+++ b/platform/linux-generic/odp_crypto.c
@@ -291,6 +291,7 @@ odp_crypto_alg_err_t aes_gcm_encrypt(odp_crypto_op_param_t 
*param,
        EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_GCM_SET_IVLEN,
                            session->p.iv.length, NULL);
        EVP_EncryptInit_ex(ctx, NULL, NULL, NULL, iv_ptr);
+       EVP_CIPHER_CTX_set_padding(ctx, 0);
 
        /* Authenticate header data (if any) without encrypting them */
        if (aad_len > 0)
@@ -338,6 +339,7 @@ odp_crypto_alg_err_t aes_gcm_decrypt(odp_crypto_op_param_t 
*param,
        EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_GCM_SET_IVLEN,
                            session->p.iv.length, NULL);
        EVP_DecryptInit_ex(ctx, NULL, NULL, NULL, iv_ptr);
+       EVP_CIPHER_CTX_set_padding(ctx, 0);
 
        EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_GCM_SET_TAG,
                            session->p.auth_digest_len, tag);
-- 
2.11.0

Reply via email to