Skip to content

Commit 98e58b8

Browse files
author
JiangShui Yang
committed
uadk_provider: compatible with openssl 3.5.5
When the OpenSSL version is 3.2.0 or later,the CTX_dup interface is already exposed and does not need to be implemented again. Signed-off-by: JiangShui Yang <yangjiangshui@h-partners.com>
1 parent 35ff73c commit 98e58b8

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

src/uadk_prov_aead.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ static struct aead_info aead_info_table[] = {
115115
{ NID_aes_256_gcm, WD_CIPHER_AES, WD_CIPHER_GCM }
116116
};
117117

118+
# if OPENSSL_VERSION_NUMBER <= 0x30200000L
118119
static EVP_CIPHER_CTX *EVP_CIPHER_CTX_dup(const EVP_CIPHER_CTX *in)
119120
{
120121
EVP_CIPHER_CTX *out = EVP_CIPHER_CTX_new();
@@ -126,6 +127,7 @@ static EVP_CIPHER_CTX *EVP_CIPHER_CTX_dup(const EVP_CIPHER_CTX *in)
126127

127128
return out;
128129
}
130+
# endif
129131

130132
static int uadk_aead_poll(void *ctx)
131133
{

src/uadk_prov_digest.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ static struct digest_info digest_info_table[] = {
123123
32, SHA_SMALL_PACKET_OFFLOAD_THRESHOLD_DEFAULT},
124124
};
125125

126+
# if OPENSSL_VERSION_NUMBER <= 0x30200000L
126127
static EVP_MD_CTX *EVP_MD_CTX_dup(const EVP_MD_CTX *in)
127128
{
128129
EVP_MD_CTX *out = EVP_MD_CTX_new();
@@ -133,6 +134,7 @@ static EVP_MD_CTX *EVP_MD_CTX_dup(const EVP_MD_CTX *in)
133134
}
134135
return out;
135136
}
137+
# endif
136138

137139
static int uadk_create_digest_soft_ctx(struct digest_priv_ctx *priv)
138140
{

0 commit comments

Comments
 (0)