Skip to content

Commit 6e1205b

Browse files
dgarskedanielinux
authored andcommitted
Fix for possible missing wc_GetPkcs8TraditionalOffset.
1 parent 409ec70 commit 6e1205b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/tpm2_wrap.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2822,8 +2822,10 @@ int wolfTPM2_DecodeRsaDer(const byte* der, word32 derSz,
28222822
rc = wc_InitRsaKey(key, NULL);
28232823
if (rc == 0) {
28242824
idx = 0;
2825+
#ifdef HAVE_PKCS8
28252826
/* skip PKCS8 header */
28262827
(void)wc_GetPkcs8TraditionalOffset((byte*)der, &idx, derSz);
2828+
#endif
28272829
rc = wc_RsaPrivateKeyDecode(der, &idx, key, derSz);
28282830
if (rc == 0) {
28292831
isPrivateKey = 1;

0 commit comments

Comments
 (0)