mirror of https://github.com/wolfSSL/wolfssh.git
Add Ed25519 key clean up
parent
64867cfb92
commit
8e5f314e52
|
|
@ -5014,8 +5014,13 @@ static int ParseEd25519PubKey(WOLFSSH *ssh,
|
|||
if (ret == WS_SUCCESS) {
|
||||
ret = wc_ed25519_import_public(encA, encASz,
|
||||
&sigKeyBlock_ptr->sk.ed25519.key);
|
||||
if (ret != 0)
|
||||
ret = WS_ED25519_E;
|
||||
}
|
||||
|
||||
if (ret == 0) {
|
||||
sigKeyBlock_ptr->keyAllocated = 1;
|
||||
}
|
||||
else {
|
||||
ret = WS_ED25519_E;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
|
@ -5328,6 +5333,11 @@ static void FreePubKey(struct wolfSSH_sigKeyBlock *p)
|
|||
wc_ecc_free(&p->sk.ecc.key);
|
||||
#endif
|
||||
}
|
||||
else if (p->useEd25519) {
|
||||
#ifndef WOLFSSH_NO_ED25519
|
||||
wc_ed25519_free(p->sk.ed25519.key);
|
||||
#endif
|
||||
}
|
||||
p->keyAllocated = 0;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue