diff options
author | 2014-06-13 10:52:24 +0000 | |
---|---|---|
committer | 2014-06-13 10:52:24 +0000 | |
commit | 71c54fb9d6bcd39a4724d23cbb2453ec0c5a380a (patch) | |
tree | 4196c2362b4eebf9a6e5c971ad7c1d7c9054eef5 /lib/libssl/ssl_lib.c | |
parent | delete a lie; replace with a truth (diff) | |
download | wireguard-openbsd-71c54fb9d6bcd39a4724d23cbb2453ec0c5a380a.tar.xz wireguard-openbsd-71c54fb9d6bcd39a4724d23cbb2453ec0c5a380a.zip |
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.
Diffstat (limited to 'lib/libssl/ssl_lib.c')
-rw-r--r-- | lib/libssl/ssl_lib.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/libssl/ssl_lib.c b/lib/libssl/ssl_lib.c index 05abdb3944d..297c80124d8 100644 --- a/lib/libssl/ssl_lib.c +++ b/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; |