diff options
author | Martin Willi <martin@revosec.ch> | 2014-02-03 13:20:46 +0100 |
---|---|---|
committer | Martin Willi <martin@revosec.ch> | 2014-03-31 15:56:12 +0200 |
commit | d3204677bad04eef716ff22dafb65b643e7564f8 (patch) | |
tree | a3809f97210333b91baa9832e0a623ffb326cc96 /src/libtls/tls_protection.h | |
parent | e5d73b0dfa6bc57b2ed8745df4409308eeaf272e (diff) | |
download | strongswan-d3204677bad04eef716ff22dafb65b643e7564f8.tar.bz2 strongswan-d3204677bad04eef716ff22dafb65b643e7564f8.tar.xz |
tls: Separate TLS protection to abstracted AEAD modes
To better separate the code path for different TLS versions and modes of
operation, we introduce a TLS AEAD abstraction. We provide three implementations
using traditional transforms, and get prepared for TLS AEAD modes.
Diffstat (limited to 'src/libtls/tls_protection.h')
-rw-r--r-- | src/libtls/tls_protection.h | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/libtls/tls_protection.h b/src/libtls/tls_protection.h index 05cf3df45..3280fb5a9 100644 --- a/src/libtls/tls_protection.h +++ b/src/libtls/tls_protection.h @@ -26,6 +26,7 @@ typedef struct tls_protection_t tls_protection_t; #include "tls.h" +#include "tls_aead.h" #include "tls_alert.h" #include "tls_compression.h" @@ -62,15 +63,12 @@ struct tls_protection_t { tls_content_type_t *type, chunk_t *data); /** - * Set a new cipher, including encryption and integrity algorithms. + * Set a new transforms to use at protection layer * * @param inbound TRUE to use cipher for inbound data, FALSE for outbound - * @param signer new signer to use, gets owned by protection layer - * @param crypter new crypter to use, gets owned by protection layer - * @param iv initial IV for crypter, gets owned by protection layer + * @param aead new AEAD transform */ - void (*set_cipher)(tls_protection_t *this, bool inbound, signer_t *signer, - crypter_t *crypter, chunk_t iv); + void (*set_cipher)(tls_protection_t *this, bool inbound, tls_aead_t *aead); /** * Set the TLS version negotiated, used for MAC calculation. |