Skip to content

Commit 2d985f0

Browse files
committed
housekeeping
1 parent e5d7832 commit 2d985f0

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

src/wh_keyid.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,7 @@ whKeyId wh_KeyId_TranslateClient(uint16_t type, uint16_t clientId,
4242
if ((reqId & 0x0200) != 0) {
4343
type = WH_KEYTYPE_WRAPPED;
4444
}
45-
else
4645
#endif
47-
{
48-
type = WH_KEYTYPE_CRYPTO;
49-
}
5046

5147
return WH_MAKE_KEYID(type, user, id);
5248
}

wolfhsm/wh_keyid.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,12 @@ typedef uint16_t whKeyId;
8787
* - 0x0100 (bit 8): WH_CLIENT_KEYID_GLOBAL_FLAG → USER = 0
8888
* - 0x0200 (bit 9): WH_CLIENT_KEYID_WRAPPED_FLAG → TYPE = WH_KEYTYPE_WRAPPED
8989
*
90-
* @param type Key type (typically WH_KEYTYPE_CRYPTO, may be overridden by
91-
* flags)
90+
* @param type Key type to use as the TYPE field. Input value is ignored and
91+
* WH_KEYTYPE_WRAPPED is used if the input clientId has the
92+
* WH_CLIENT_KEYID_WRAPPED flag set.
9293
* @param clientId Client identifier to use as USER field
9394
* @param reqId Requested keyId from client (may include flags)
94-
* @return Server-internal keyId with TYPE, USER, and ID fields properly set
95+
* @return Server-internal keyId with TYPE, USER, and ID fields properly set.
9596
*/
9697
whKeyId wh_KeyId_TranslateClient(uint16_t type, uint16_t clientId,
9798
whKeyId reqId);

0 commit comments

Comments
 (0)