Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/pk_ec.c
Original file line number Diff line number Diff line change
Expand Up @@ -3581,7 +3581,7 @@ int wolfSSL_EC_KEY_LoadDer_ex(WOLFSSL_EC_KEY* key, const unsigned char* derBuf,
* have a PKCS8 header then do not error out.
*/
if ((ret = ToTraditionalInline_ex((const byte*)derBuf, &idx,
(word32)derSz, &algId)) > 0) {
(word32)derSz, &algId)) >= 0) {
WOLFSSL_MSG("Found PKCS8 header");
key->pkcs8HeaderSz = (word16)idx;
res = 1;
Expand Down
2 changes: 1 addition & 1 deletion src/pk_rsa.c
Original file line number Diff line number Diff line change
Expand Up @@ -924,7 +924,7 @@ int wolfSSL_RSA_LoadDer_ex(WOLFSSL_RSA* rsa, const unsigned char* derBuf,
* have a PKCS8 header then do not error out. */
res = ToTraditionalInline_ex((const byte*)derBuf, &idx, (word32)derSz,
&algId);
if (res > 0) {
if (res >= 0) {
/* Store size of PKCS#8 header for encoding. */
WOLFSSL_MSG("Found PKCS8 header");
rsa->pkcs8HeaderSz = (word16)idx;
Expand Down
Loading