Fix compilation without deprecated OpenSSL APIs
[oweals/tinc.git] / src / connection.c
index 38b3ccfe1b91c675fd5e7783b89474a5c2778c67..d137af12f796142d3eeee267cdc5016e82cb6b84 100644 (file)
@@ -96,13 +96,13 @@ void free_connection_partially(connection_t *c) {
        c->outbudget = 0;
 
        if(c->inctx) {
-               EVP_CIPHER_CTX_cleanup(c->inctx);
+               EVP_CIPHER_CTX_reset(c->inctx);
                free(c->inctx);
                c->inctx = NULL;
        }
 
        if(c->outctx) {
-               EVP_CIPHER_CTX_cleanup(c->outctx);
+               EVP_CIPHER_CTX_reset(c->outctx);
                free(c->outctx);
                c->outctx = NULL;
        }