We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 64867cf commit 8e5f314Copy full SHA for 8e5f314
src/internal.c
@@ -5014,8 +5014,13 @@ static int ParseEd25519PubKey(WOLFSSH *ssh,
5014
if (ret == WS_SUCCESS) {
5015
ret = wc_ed25519_import_public(encA, encASz,
5016
&sigKeyBlock_ptr->sk.ed25519.key);
5017
- if (ret != 0)
5018
- ret = WS_ED25519_E;
+ }
+
5019
+ if (ret == 0) {
5020
+ sigKeyBlock_ptr->keyAllocated = 1;
5021
5022
+ else {
5023
+ ret = WS_ED25519_E;
5024
}
5025
return ret;
5026
@@ -5328,6 +5333,11 @@ static void FreePubKey(struct wolfSSH_sigKeyBlock *p)
5328
5333
wc_ecc_free(&p->sk.ecc.key);
5329
5334
#endif
5330
5335
5336
+ else if (p->useEd25519) {
5337
+ #ifndef WOLFSSH_NO_ED25519
5338
+ wc_ed25519_free(p->sk.ed25519.key);
5339
+ #endif
5340
5331
5341
p->keyAllocated = 0;
5332
5342
5343
0 commit comments