From 23cff71bbfa0ceac41f8bb90db5f9c0a9f02b660 Mon Sep 17 00:00:00 2001 From: Juliusz Sosinowicz Date: Thu, 22 Jul 2021 20:47:36 +0200 Subject: [PATCH] Second `wc_EccPrivateKeyDecode` not needed now that it supports PKCS8 --- src/ssl.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/ssl.c b/src/ssl.c index 6e237524b..f6079e70f 100644 --- a/src/ssl.c +++ b/src/ssl.c @@ -38445,15 +38445,6 @@ int wolfSSL_EC_KEY_LoadDer_ex(WOLFSSL_EC_KEY* key, const unsigned char* derBuf, ret = wc_EccPublicKeyDecode(derBuf, &idx, (ecc_key*)key->internal, derSz); } - if (ret < 0 && opt == WOLFSSL_EC_KEY_LOAD_PRIVATE) { - /* Might be in PKCS8 format so let's try */ - idx = 0; - ret = ToTraditionalInline(derBuf, &idx, (word32)derSz); - if (ret > 0) { - ret = wc_EccPrivateKeyDecode(derBuf, &idx, - (ecc_key*)key->internal, derSz); - } - } if (ret < 0) { if (opt == WOLFSSL_EC_KEY_LOAD_PRIVATE) { WOLFSSL_MSG("wc_EccPrivateKeyDecode failed");