Skip to content

Commit 073bf03

Browse files
fix for no store macro guard
1 parent 87fc177 commit 073bf03

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/crypto.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6641,7 +6641,7 @@ CK_RV C_WrapKey(CK_SESSION_HANDLE hSession,
66416641
}
66426642

66436643
switch (keyType) {
6644-
#ifndef NO_RSA
6644+
#if !defined(NO_RSA) && !defined(WOLFPKCS11_NO_STORE)
66456645
case CKK_RSA:
66466646
ret = WP11_Rsa_SerializeKeyPTPKC8(key, NULL, &serialSize);
66476647
if (ret != 0)
@@ -6659,6 +6659,7 @@ CK_RV C_WrapKey(CK_SESSION_HANDLE hSession,
66596659
}
66606660
break;
66616661
#endif
6662+
#if defined(WOLFSSL_STM32U5_DHUK) || !defined(WOLFPKCS11_NO_STORE)
66626663
#ifndef NO_AES
66636664
case CKK_AES:
66646665
#endif
@@ -6681,6 +6682,7 @@ CK_RV C_WrapKey(CK_SESSION_HANDLE hSession,
66816682
goto err_out;
66826683
}
66836684
break;
6685+
#endif
66846686
default:
66856687
rv = CKR_KEY_NOT_WRAPPABLE;
66866688
goto err_out;

src/internal.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7161,6 +7161,7 @@ int WP11_Session_RemoveObject(WP11_Session* session, WP11_Object* object)
71617161
else {
71627162
WP11_Lock_UnlockRW(&session->slot->token.lock);
71637163
}
7164+
(void)id; /* set but not used with WOLFPKCS11_NO_STORE */
71647165
return ret;
71657166
}
71667167

0 commit comments

Comments
 (0)