summaryrefslogtreecommitdiffstats
path: root/lib/libssl/src/ssl/ssl_locl.h
diff options
context:
space:
mode:
authorjsing <jsing@openbsd.org>2014-06-13 10:52:24 +0000
committerjsing <jsing@openbsd.org>2014-06-13 10:52:24 +0000
commit71c54fb9d6bcd39a4724d23cbb2453ec0c5a380a (patch)
tree4196c2362b4eebf9a6e5c971ad7c1d7c9054eef5 /lib/libssl/src/ssl/ssl_locl.h
parentdelete a lie; replace with a truth (diff)
downloadwireguard-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/src/ssl/ssl_locl.h')
-rw-r--r--lib/libssl/src/ssl/ssl_locl.h23
1 files changed, 22 insertions, 1 deletions
diff --git a/lib/libssl/src/ssl/ssl_locl.h b/lib/libssl/src/ssl/ssl_locl.h
index 18b329048e8..ea5f8c3d4e5 100644
--- a/lib/libssl/src/ssl/ssl_locl.h
+++ b/lib/libssl/src/ssl/ssl_locl.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssl_locl.h,v 1.49 2014/06/12 15:49:31 deraadt Exp $ */
+/* $OpenBSD: ssl_locl.h,v 1.50 2014/06/13 10:52:24 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -578,6 +578,27 @@ typedef struct ssl3_enc_method {
/* Allow TLS 1.2 ciphersuites: applies to DTLS 1.2 as well as TLS 1.2. */
#define SSL_ENC_FLAG_TLS1_2_CIPHERS (1 << 4)
+/*
+ * ssl_aead_ctx_st contains information about an AEAD that is being used to
+ * encrypt an SSL connection.
+ */
+struct ssl_aead_ctx_st {
+ EVP_AEAD_CTX ctx;
+ /*
+ * fixed_nonce contains any bytes of the nonce that are fixed for all
+ * records.
+ */
+ unsigned char fixed_nonce[8];
+ unsigned char fixed_nonce_len;
+ unsigned char variable_nonce_len;
+ unsigned char tag_len;
+ /*
+ * variable_nonce_in_record is non-zero if the variable nonce
+ * for a record is included as a prefix before the ciphertext.
+ */
+ char variable_nonce_in_record;
+};
+
#ifndef OPENSSL_NO_COMP
/* Used for holding the relevant compression methods loaded into SSL_CTX */
typedef struct ssl3_comp_st {