summaryrefslogtreecommitdiff
path: root/src/libtls/tls_handshake.h
diff options
context:
space:
mode:
authorYves-Alexis Perez <corsac@corsac.net>2012-06-28 21:16:07 +0200
committerYves-Alexis Perez <corsac@corsac.net>2012-06-28 21:16:07 +0200
commitb34738ed08c2227300d554b139e2495ca5da97d6 (patch)
tree62f33b52820f2e49f0e53c0f8c636312037c8054 /src/libtls/tls_handshake.h
parent0a9d51a49042a68daa15b0c74a2b7f152f52606b (diff)
downloadvyos-strongswan-b34738ed08c2227300d554b139e2495ca5da97d6.tar.gz
vyos-strongswan-b34738ed08c2227300d554b139e2495ca5da97d6.zip
Imported Upstream version 4.6.4
Diffstat (limited to 'src/libtls/tls_handshake.h')
-rw-r--r--src/libtls/tls_handshake.h22
1 files changed, 12 insertions, 10 deletions
diff --git a/src/libtls/tls_handshake.h b/src/libtls/tls_handshake.h
index 6703b341b..bea0024eb 100644
--- a/src/libtls/tls_handshake.h
+++ b/src/libtls/tls_handshake.h
@@ -24,8 +24,9 @@
typedef struct tls_handshake_t tls_handshake_t;
#include "tls.h"
-#include "tls_reader.h"
-#include "tls_writer.h"
+
+#include <bio/bio_reader.h>
+#include <bio/bio_writer.h>
/**
* TLS handshake state machine interface.
@@ -44,7 +45,7 @@ struct tls_handshake_t {
* - DESTROY_ME if a fatal TLS alert received
*/
status_t (*process)(tls_handshake_t *this,
- tls_handshake_type_t type, tls_reader_t *reader);
+ tls_handshake_type_t type, bio_reader_t *reader);
/**
* Build TLS handshake messages to send out.
@@ -58,21 +59,22 @@ struct tls_handshake_t {
* - INVALID_STATE if more input to process() required
*/
status_t (*build)(tls_handshake_t *this,
- tls_handshake_type_t *type, tls_writer_t *writer);
+ tls_handshake_type_t *type, bio_writer_t *writer);
/**
- * Check if the cipher spec for outgoing messages has changed.
+ * Check if the cipher spec should be changed for outgoing messages.
*
- * @return TRUE if cipher spec changed
+ * @param inbound TRUE to check for inbound cipherspec change
+ * @return TRUE if cipher spec should be changed
*/
- bool (*cipherspec_changed)(tls_handshake_t *this);
+ bool (*cipherspec_changed)(tls_handshake_t *this, bool inbound);
/**
- * Change the cipher spec for incoming messages.
+ * Change the cipher for a direction.
*
- * @return TRUE if cipher spec changed
+ * @param inbound TRUE to change inbound cipherspec, FALSE for outbound
*/
- bool (*change_cipherspec)(tls_handshake_t *this);
+ void (*change_cipherspec)(tls_handshake_t *this, bool inbound);
/**
* Check if the finished message was decoded successfully.