Free ECDSA and RSA structures when freeing a connection_t.

This commit is contained in:
Guus Sliepen 2011-07-10 21:02:34 +02:00
parent 73863fab8a
commit 027228debe
5 changed files with 30 additions and 0 deletions

View file

@ -105,3 +105,14 @@ bool ecdsa_verify(ecdsa_t *ecdsa, const void *in, size_t len, const void *sig) {
return true;
}
bool ecdsa_active(ecdsa_t *ecdsa) {
return *ecdsa;
}
void ecdsa_free(ecdsa_t *ecdsa) {
if(*ecdsa) {
EC_KEY_free(*ecdsa);
*ecdsa = NULL;
}
}