aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/tls/tls_messages.h
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2016-11-16 01:34:19 -0500
committerJack Lloyd <[email protected]>2016-11-26 12:41:03 -0500
commit10244d3fa88365a3740eb66ccfd9c90f3a866fcd (patch)
tree54a746fdcdebd327bbd71d023ce6d02ef7e66b44 /src/lib/tls/tls_messages.h
parent5372d0b499ad317ab3776c9ac92df866cc6a1e84 (diff)
Add OCSP stapling support to TLS client
Diffstat (limited to 'src/lib/tls/tls_messages.h')
-rw-r--r--src/lib/tls/tls_messages.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/lib/tls/tls_messages.h b/src/lib/tls/tls_messages.h
index 5e6962329..82fa22320 100644
--- a/src/lib/tls/tls_messages.h
+++ b/src/lib/tls/tls_messages.h
@@ -184,6 +184,11 @@ class BOTAN_DLL Client_Hello final : public Handshake_Message
return m_extensions.has<Extended_Master_Secret>();
}
+ bool supports_cert_status_message() const
+ {
+ return m_extensions.has<Certificate_Status_Request>();
+ }
+
bool supports_encrypt_then_mac() const
{
return m_extensions.has<Encrypt_then_MAC>();
@@ -313,6 +318,11 @@ class BOTAN_DLL Server_Hello final : public Handshake_Message
return m_extensions.has<Encrypt_then_MAC>();
}
+ bool supports_certificate_status_message() const
+ {
+ return m_extensions.has<Certificate_Status_Request>();
+ }
+
bool supports_session_ticket() const
{
return m_extensions.has<Session_Ticket>();
@@ -439,6 +449,27 @@ class Certificate final : public Handshake_Message
};
/**
+* Certificate Status (RFC 6066)
+*/
+class Certificate_Status final : public Handshake_Message
+ {
+ public:
+ Handshake_Type type() const override { return CERTIFICATE_STATUS; }
+
+ std::shared_ptr<const OCSP::Response> response() const { return m_response; }
+
+ Certificate_Status(const std::vector<byte>& buf);
+
+ Certificate_Status(Handshake_IO& io,
+ Handshake_Hash& hash,
+ std::shared_ptr<const OCSP::Response> response);
+
+ private:
+ std::vector<byte> serialize() const override;
+ std::shared_ptr<const OCSP::Response> m_response;
+ };
+
+/**
* Certificate Request Message
*/
class Certificate_Req final : public Handshake_Message