@@ -33691,8 +33691,8 @@ int DecodeAsymKeyPublic(const byte* input, word32* inOutIdx, word32 inSz,
3369133691#endif /* WC_ENABLE_ASYM_KEY_IMPORT */
3369233692
3369333693#if defined(HAVE_ED25519) && defined(HAVE_ED25519_KEY_IMPORT)
33694- int wc_Ed25519PrivateKeyDecode (const byte* input, word32* inOutIdx,
33695- ed25519_key* key, word32 inSz)
33694+ int wc_Ed25519PrivateKeyDecode_ex (const byte* input, word32* inOutIdx,
33695+ ed25519_key* key, word32 inSz, int trusted )
3369633696{
3369733697 int ret;
3369833698 byte privKey[ED25519_KEY_SIZE], pubKey[2*ED25519_PUB_KEY_SIZE+1];
@@ -33710,13 +33710,19 @@ int wc_Ed25519PrivateKeyDecode(const byte* input, word32* inOutIdx,
3371033710 ret = wc_ed25519_import_private_only(privKey, privKeyLen, key);
3371133711 }
3371233712 else {
33713- ret = wc_ed25519_import_private_key (privKey, privKeyLen,
33714- pubKey, pubKeyLen, key);
33713+ ret = wc_ed25519_import_private_key_ex (privKey, privKeyLen,
33714+ pubKey, pubKeyLen, key, trusted );
3371533715 }
3371633716 }
3371733717 return ret;
3371833718}
3371933719
33720+ int wc_Ed25519PrivateKeyDecode(const byte* input, word32* inOutIdx,
33721+ ed25519_key* key, word32 inSz)
33722+ {
33723+ return wc_Ed25519PrivateKeyDecode_ex(input, inOutIdx, key, inSz, 0);
33724+ }
33725+
3372033726int wc_Ed25519PublicKeyDecode(const byte* input, word32* inOutIdx,
3372133727 ed25519_key* key, word32 inSz)
3372233728{
@@ -34114,8 +34120,8 @@ int wc_Curve25519KeyToDer(curve25519_key* key, byte* output, word32 outLen,
3411434120#endif /* HAVE_CURVE25519 && HAVE_CURVE25519_KEY_EXPORT */
3411534121
3411634122#if defined(HAVE_ED448) && defined(HAVE_ED448_KEY_IMPORT)
34117- int wc_Ed448PrivateKeyDecode (const byte* input, word32* inOutIdx,
34118- ed448_key* key, word32 inSz)
34123+ int wc_Ed448PrivateKeyDecode_ex (const byte* input, word32* inOutIdx,
34124+ ed448_key* key, word32 inSz, int trusted )
3411934125{
3412034126 int ret;
3412134127 byte privKey[ED448_KEY_SIZE], pubKey[ED448_PUB_KEY_SIZE];
@@ -34133,13 +34139,19 @@ int wc_Ed448PrivateKeyDecode(const byte* input, word32* inOutIdx,
3413334139 ret = wc_ed448_import_private_only(privKey, privKeyLen, key);
3413434140 }
3413534141 else {
34136- ret = wc_ed448_import_private_key (privKey, privKeyLen,
34137- pubKey, pubKeyLen, key);
34142+ ret = wc_ed448_import_private_key_ex (privKey, privKeyLen,
34143+ pubKey, pubKeyLen, key, trusted );
3413834144 }
3413934145 }
3414034146 return ret;
3414134147}
3414234148
34149+ int wc_Ed448PrivateKeyDecode(const byte* input, word32* inOutIdx,
34150+ ed448_key* key, word32 inSz)
34151+ {
34152+ return wc_Ed448PrivateKeyDecode_ex(input, inOutIdx, key, inSz, 0);
34153+ }
34154+
3414334155int wc_Ed448PublicKeyDecode(const byte* input, word32* inOutIdx,
3414434156 ed448_key* key, word32 inSz)
3414534157{
0 commit comments