diff --git a/wolfcrypt/src/asn.c b/wolfcrypt/src/asn.c index d6e9b7768..6a1f954d0 100644 --- a/wolfcrypt/src/asn.c +++ b/wolfcrypt/src/asn.c @@ -10564,7 +10564,8 @@ int PemToDer(const unsigned char* buff, long longSz, int type, else { if (passwordSz == 0) { /* The key is encrypted but does not have a password */ - ret = ASN_PARSE_E; + WOLFSSL_MSG("No password for encrypted key"); + ret = NO_PASSWORD; } else { ret = wc_BufferKeyDecrypt(info, der->buffer, der->length,