diff options
author | Martin Willi <martin@revosec.ch> | 2010-08-23 14:22:38 +0200 |
---|---|---|
committer | Martin Willi <martin@revosec.ch> | 2010-08-23 15:13:37 +0200 |
commit | e6f3ef13303313ce4a87983fe640f958e07cc676 (patch) | |
tree | 7dd486d439e7b7975be96d5160a5ceaf5550a2ea /src/libtls/tls_protection.h | |
parent | 908e752201cc5cfc7f663e724f0ab3dc76c72d0a (diff) | |
download | strongswan-e6f3ef13303313ce4a87983fe640f958e07cc676.tar.bz2 strongswan-e6f3ef13303313ce4a87983fe640f958e07cc676.tar.xz |
Implemented TLS Alert handling
Diffstat (limited to 'src/libtls/tls_protection.h')
-rw-r--r-- | src/libtls/tls_protection.h | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src/libtls/tls_protection.h b/src/libtls/tls_protection.h index aa7681bd5..99c94e935 100644 --- a/src/libtls/tls_protection.h +++ b/src/libtls/tls_protection.h @@ -21,13 +21,14 @@ #ifndef TLS_PROTECTION_H_ #define TLS_PROTECTION_H_ -typedef struct tls_protection_t tls_protection_t; - #include <library.h> #include "tls.h" +#include "tls_alert.h" #include "tls_compression.h" +typedef struct tls_protection_t tls_protection_t; + /** * TLS record protocol protection layer. */ @@ -72,6 +73,13 @@ struct tls_protection_t { crypter_t *crypter, chunk_t iv); /** + * Set the TLS version negotiated, used for MAC calculation. + * + * @param version TLS version negotiated + */ + void (*set_version)(tls_protection_t *this, tls_version_t version); + + /** * Destroy a tls_protection_t. */ void (*destroy)(tls_protection_t *this); @@ -80,11 +88,11 @@ struct tls_protection_t { /** * Create a tls_protection instance. * - * @param tls TLS context * @param compression compression layer of TLS stack + * @param alert TLS alert handler * @return TLS protection layer. */ -tls_protection_t *tls_protection_create(tls_t *tls, - tls_compression_t *compression); +tls_protection_t *tls_protection_create(tls_compression_t *compression, + tls_alert_t *alert); #endif /** TLS_PROTECTION_H_ @}*/ |