
1. Code comments are placed above or to the right of the corresponding code 2. An array declaration must explicitly specify its size. 3. Do not abuse typedef or #define to set aliases for primitive types. Signed-off-by: Qi Tao <taoqi10@huawei.com> Signed-off-by: JiangShui Yang <yangjiangshui@h-partners.com> --- src/uadk_digest.c | 3 ++- src/uadk_prov.h | 4 ++-- src/uadk_prov_rsa.c | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/uadk_digest.c b/src/uadk_digest.c index 69f9c5c..0b4e8c5 100644 --- a/src/uadk_digest.c +++ b/src/uadk_digest.c @@ -100,6 +100,7 @@ struct evp_md_ctx_st { int (*update)(EVP_MD_CTX *ctx, const void *data, size_t count); }; # else +/* EVP_MD_CTX */ struct evp_md_ctx_st { const EVP_MD *reqdigest; /* The original requested digest */ const EVP_MD *digest; @@ -119,7 +120,7 @@ struct evp_md_ctx_st { */ void *algctx; EVP_MD *fetched_digest; -} /* EVP_MD_CTX */; +}; #endif struct digest_priv_ctx { diff --git a/src/uadk_prov.h b/src/uadk_prov.h index ac83ee5..3ac4ac3 100644 --- a/src/uadk_prov.h +++ b/src/uadk_prov.h @@ -172,8 +172,8 @@ extern const OSSL_DISPATCH uadk_sm4_ctr_functions[FUNC_MAX_NUM]; extern const OSSL_DISPATCH uadk_aes_128_gcm_functions[FUNC_MAX_NUM]; extern const OSSL_DISPATCH uadk_aes_192_gcm_functions[FUNC_MAX_NUM]; extern const OSSL_DISPATCH uadk_aes_256_gcm_functions[FUNC_MAX_NUM]; -extern const OSSL_DISPATCH uadk_des_ede3_cbc_functions[]; -extern const OSSL_DISPATCH uadk_des_ede3_ecb_functions[]; +extern const OSSL_DISPATCH uadk_des_ede3_cbc_functions[FUNC_MAX_NUM]; +extern const OSSL_DISPATCH uadk_des_ede3_ecb_functions[FUNC_MAX_NUM]; extern const OSSL_DISPATCH uadk_rsa_signature_functions[FUNC_MAX_NUM]; extern const OSSL_DISPATCH uadk_rsa_keymgmt_functions[FUNC_MAX_NUM]; diff --git a/src/uadk_prov_rsa.c b/src/uadk_prov_rsa.c index facac0e..88789c0 100644 --- a/src/uadk_prov_rsa.c +++ b/src/uadk_prov_rsa.c @@ -223,7 +223,7 @@ struct rsa_st { /* Be careful using this if the RSA structure is shared */ CRYPTO_EX_DATA ex_data; - CRYPTO_REF_COUNT references; + int references; int flags; /* Used to cache montgomery values */ BN_MONT_CTX *_method_mod_n; -- 2.33.0