diff options
author | lloyd <[email protected]> | 2012-04-16 19:00:49 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2012-04-16 19:00:49 +0000 |
commit | b224e899c8846f17a36dc41c53dd94ba037ada79 (patch) | |
tree | 81e2b0391b436b7620ffbeaa15252c75ae3c9039 /src/tls/tls_record.h | |
parent | c09b208d5d3ead81ef7ad662f71f55f1e00f61bc (diff) |
Add support for TLS heartbeats (RFC 6520). Heartbeat initiations from
the peer are automatically responded to. TLS::Channel::heartbeat can
initiate a new heartbeat if the peer allows it. Heartbeat replies are
passed back to the application processing function with an Alert value
of HEARTBEAT_PAYLOAD (a 'fake' value, 256, which is out of range of
the valid TLS alert space), along with the sent payload.
The RFC requires us to have no more than one heartbeat 'in flight' at
a time, ie without getting a response (or a timeout in the case of
DTLS). Currently we do not prevent an application from requesting
more.
Diffstat (limited to 'src/tls/tls_record.h')
-rw-r--r-- | src/tls/tls_record.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/tls/tls_record.h b/src/tls/tls_record.h index fb27db5e2..38eae7823 100644 --- a/src/tls/tls_record.h +++ b/src/tls/tls_record.h @@ -46,6 +46,9 @@ class BOTAN_DLL Record_Writer void send(byte type, const byte input[], size_t length); void send(byte type, byte val) { send(type, &val, 1); } + void send(byte type, const MemoryRegion<byte>& input) + { send(type, &input[0], input.size()); } + MemoryVector<byte> send(class Handshake_Message& msg); void send_alert(const Alert& alert); |