aboutsummaryrefslogtreecommitdiffstats
path: root/src/tls/tls_magic.h
diff options
context:
space:
mode:
authorlloyd <[email protected]>2012-04-16 19:00:49 +0000
committerlloyd <[email protected]>2012-04-16 19:00:49 +0000
commitb224e899c8846f17a36dc41c53dd94ba037ada79 (patch)
tree81e2b0391b436b7620ffbeaa15252c75ae3c9039 /src/tls/tls_magic.h
parentc09b208d5d3ead81ef7ad662f71f55f1e00f61bc (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_magic.h')
-rw-r--r--src/tls/tls_magic.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/tls/tls_magic.h b/src/tls/tls_magic.h
index 6dd50ead2..2972321c9 100644
--- a/src/tls/tls_magic.h
+++ b/src/tls/tls_magic.h
@@ -32,7 +32,8 @@ enum Record_Type {
CHANGE_CIPHER_SPEC = 20,
ALERT = 21,
HANDSHAKE = 22,
- APPLICATION_DATA = 23
+ APPLICATION_DATA = 23,
+ HEARTBEAT = 24,
};
enum Handshake_Type {