Skip to content

Commit 877a43d

Browse files
committed
Fix for missing WC_PK_TYPE_RSA_GET_SIZE in older releases
1 parent bf1d5c7 commit 877a43d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/tpm2_cryptocb.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ int wolfTPM2_CryptoDevCb(int devId, wc_CryptoInfo* info, void* ctx)
120120
#endif
121121
rc = exit_rc;
122122
}
123+
#if defined(LIBWOLFSSL_VERSION_HEX) && LIBWOLFSSL_VERSION_HEX > 0x05006000
123124
else if (info->pk.type == WC_PK_TYPE_RSA_GET_SIZE) {
124125
if (tlsCtx->rsaKey != NULL) {
125126
*info->pk.rsa_get_size.keySize =
@@ -128,6 +129,7 @@ int wolfTPM2_CryptoDevCb(int devId, wc_CryptoInfo* info, void* ctx)
128129
rc = 0;
129130
}
130131
}
132+
#endif
131133
else if (info->pk.type == WC_PK_TYPE_RSA) {
132134
switch (info->pk.rsa.type) {
133135
case RSA_PUBLIC_ENCRYPT:

0 commit comments

Comments
 (0)