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

@ -88,3 +88,14 @@ bool rsa_private_decrypt(rsa_t *rsa, void *in, size_t len, void *out) {
logger(LOG_ERR, "Unable to perform RSA decryption: %s", ERR_error_string(ERR_get_error(), NULL));
return false;
}
bool rsa_active(rsa_t *rsa) {
return *rsa;
}
void rsa_free(rsa_t *rsa) {
if(*rsa) {
RSA_free(*rsa);
*rsa = NULL;
}
}