From b7bb19a4e5c239035926f952d24c2e95bf813fd8 Mon Sep 17 00:00:00 2001 From: Weili Qian Date: Mon, 20 Dec 2021 02:48:54 +0000 Subject: [PATCH 02/18] uadk_engine: define the variable as 'const' Parameter: 'n' in the function has not been changed, it should be defined as 'const'. Signed-off-by: Weili Qian --- src/uadk_rsa.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/uadk_rsa.c b/src/uadk_rsa.c index bab3c24..75ae0d1 100644 --- a/src/uadk_rsa.c +++ b/src/uadk_rsa.c @@ -174,7 +174,7 @@ static int prime_mul_res(int num, BIGNUM *rsa_p, BIGNUM *rsa_q, BIGNUM *r1, } static int check_prime_sufficient(int *num, const int *bitsr, int *bitse, - int *n, BIGNUM *rsa_p, BIGNUM *rsa_q, + const int *n, BIGNUM *rsa_p, BIGNUM *rsa_q, BIGNUM *r1, BIGNUM *r2, BN_CTX *ctx, BN_GENCB *cb) { @@ -268,7 +268,7 @@ static int check_prime_equal(int num, BIGNUM *rsa_p, BIGNUM *rsa_q, return UADK_E_SUCCESS; } -static int check_prime_useful(int *n, BIGNUM *prime, BIGNUM *r1, BIGNUM *r2, +static int check_prime_useful(const int *n, BIGNUM *prime, BIGNUM *r1, BIGNUM *r2, BIGNUM *e_pub, BN_CTX *ctx, BN_GENCB *cb) { unsigned long err; -- 2.24.4