From 87e30739835137951cf48dfa7f692aae2f40dc40 Mon Sep 17 00:00:00 2001 From: jsing <> Date: Fri, 13 Jun 2014 10:52:24 +0000 Subject: Add an SSL_AEAD_CTX to enable the use of EVP_AEAD with an SSL cipher. Read and write contexts are also added to the SSL_CTX, along with supporting code. Based on Adam Langley's chromium diffs. Rides the recent SSL library bump. --- src/lib/libssl/ssl_lib.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src/lib/libssl/ssl_lib.c') diff --git a/src/lib/libssl/ssl_lib.c b/src/lib/libssl/ssl_lib.c index 05abdb3944..297c80124d 100644 --- a/src/lib/libssl/ssl_lib.c +++ b/src/lib/libssl/ssl_lib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssl_lib.c,v 1.66 2014/06/13 04:29:13 miod Exp $ */ +/* $OpenBSD: ssl_lib.c,v 1.67 2014/06/13 10:52:24 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -2660,6 +2660,17 @@ ssl_clear_cipher_ctx(SSL *s) EVP_CIPHER_CTX_free(s->enc_write_ctx); s->enc_write_ctx = NULL; + if (s->aead_read_ctx != NULL) { + EVP_AEAD_CTX_cleanup(&s->aead_read_ctx->ctx); + free(s->aead_read_ctx); + s->aead_read_ctx = NULL; + } + if (s->aead_write_ctx != NULL) { + EVP_AEAD_CTX_cleanup(&s->aead_write_ctx->ctx); + free(s->aead_write_ctx); + s->aead_write_ctx = NULL; + } + #ifndef OPENSSL_NO_COMP COMP_CTX_free(s->expand); s->expand = NULL; -- cgit v1.2.3-55-g6feb