From 0c2345b95b00f4f5af4e8fbe6ed7482bde2e98c2 Mon Sep 17 00:00:00 2001 From: Songling Han Date: Sun, 22 Sep 2024 02:00:38 +0000 Subject: [PATCH] fix OQS_OPENSSL_GUARD failure Signed-off-by: Songling Han --- src/common/aes/aes_ossl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/common/aes/aes_ossl.c b/src/common/aes/aes_ossl.c index 96993739a..f9878d029 100644 --- a/src/common/aes/aes_ossl.c +++ b/src/common/aes/aes_ossl.c @@ -305,7 +305,7 @@ static void AES256_CTR_inc_stream_iv(const uint8_t *iv, size_t iv_len, const voi return; /* TODO: better error handling */ } const struct key_schedule *ks = (const struct key_schedule *) schedule; - if (OQS_OPENSSL_GUARD(OSSL_FUNC(EVP_EncryptInit_ex)(ctr_ctx, oqs_aes_256_ctr(), NULL, ks->key, iv_ctr)) != 1) { + if (OSSL_FUNC(EVP_EncryptInit_ex)(ctr_ctx, oqs_aes_256_ctr(), NULL, ks->key, iv_ctr) != 1) { OSSL_FUNC(EVP_CIPHER_CTX_free)(ctr_ctx); return; } @@ -313,11 +313,11 @@ static void AES256_CTR_inc_stream_iv(const uint8_t *iv, size_t iv_len, const voi SIZE_T_TO_INT_OR_EXIT(out_len, out_len_input_int) memset(out, 0, (size_t)out_len_input_int); int out_len_output; - if (OQS_OPENSSL_GUARD(OSSL_FUNC(EVP_EncryptUpdate)(ctr_ctx, out, &out_len_output, out, out_len_input_int)) != 1) { + if (OSSL_FUNC(EVP_EncryptUpdate)(ctr_ctx, out, &out_len_output, out, out_len_input_int) != 1) { OSSL_FUNC(EVP_CIPHER_CTX_free)(ctr_ctx); return; } - if (OQS_OPENSSL_GUARD(OSSL_FUNC(EVP_EncryptFinal_ex)(ctr_ctx, out + out_len_output, &out_len_output)) != 1) { + if (OSSL_FUNC(EVP_EncryptFinal_ex)(ctr_ctx, out + out_len_output, &out_len_output) != 1) { OSSL_FUNC(EVP_CIPHER_CTX_free)(ctr_ctx); return; }