diff options
author | jsing <> | 2014-06-13 10:52:24 +0000 |
---|---|---|
committer | jsing <> | 2014-06-13 10:52:24 +0000 |
commit | 87e30739835137951cf48dfa7f692aae2f40dc40 (patch) | |
tree | c478059909f99617992b0630fe527244e4f5873d /src/lib/libssl/ssl_lib.c | |
parent | 9ef9f06708ef4fe615f3485f5d82f3fb919fdf03 (diff) | |
download | openbsd-87e30739835137951cf48dfa7f692aae2f40dc40.tar.gz openbsd-87e30739835137951cf48dfa7f692aae2f40dc40.tar.bz2 openbsd-87e30739835137951cf48dfa7f692aae2f40dc40.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 'src/lib/libssl/ssl_lib.c')
-rw-r--r-- | src/lib/libssl/ssl_lib.c | 13 |
1 files changed, 12 insertions, 1 deletions
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 @@ | |||
1 | /* $OpenBSD: ssl_lib.c,v 1.66 2014/06/13 04:29:13 miod Exp $ */ | 1 | /* $OpenBSD: ssl_lib.c,v 1.67 2014/06/13 10:52:24 jsing Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -2660,6 +2660,17 @@ ssl_clear_cipher_ctx(SSL *s) | |||
2660 | EVP_CIPHER_CTX_free(s->enc_write_ctx); | 2660 | EVP_CIPHER_CTX_free(s->enc_write_ctx); |
2661 | s->enc_write_ctx = NULL; | 2661 | s->enc_write_ctx = NULL; |
2662 | 2662 | ||
2663 | if (s->aead_read_ctx != NULL) { | ||
2664 | EVP_AEAD_CTX_cleanup(&s->aead_read_ctx->ctx); | ||
2665 | free(s->aead_read_ctx); | ||
2666 | s->aead_read_ctx = NULL; | ||
2667 | } | ||
2668 | if (s->aead_write_ctx != NULL) { | ||
2669 | EVP_AEAD_CTX_cleanup(&s->aead_write_ctx->ctx); | ||
2670 | free(s->aead_write_ctx); | ||
2671 | s->aead_write_ctx = NULL; | ||
2672 | } | ||
2673 | |||
2663 | #ifndef OPENSSL_NO_COMP | 2674 | #ifndef OPENSSL_NO_COMP |
2664 | COMP_CTX_free(s->expand); | 2675 | COMP_CTX_free(s->expand); |
2665 | s->expand = NULL; | 2676 | s->expand = NULL; |