diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/ssl/hello.cpp | 8 | ||||
-rw-r--r-- | src/ssl/tls_magic.h | 2 | ||||
-rw-r--r-- | src/ssl/tls_messages.h | 3 |
3 files changed, 13 insertions, 0 deletions
diff --git a/src/ssl/hello.cpp b/src/ssl/hello.cpp index 2c5a9d2ea..ae0d9607b 100644 --- a/src/ssl/hello.cpp +++ b/src/ssl/hello.cpp @@ -190,6 +190,14 @@ void Client_Hello::deserialize(const MemoryRegion<byte>& buf) } } } + else if(extension_code == TLSEXT_SRP_IDENTIFIER) + { + std::vector<byte> name = reader.get_range_vector<byte>(1, 1, 255); + + requested_srp_id.assign( + reinterpret_cast<char*>(&name[0]), + name.size()); + } else { reader.discard_next(extension_size); diff --git a/src/ssl/tls_magic.h b/src/ssl/tls_magic.h index 0c2a610b1..00898738e 100644 --- a/src/ssl/tls_magic.h +++ b/src/ssl/tls_magic.h @@ -181,6 +181,8 @@ enum TLS_Handshake_Extension_Type { TLSEXT_USABLE_ELLIPTIC_CURVES = 10, TLSEXT_EC_POINT_FORMATS = 11, + TLSEXT_SRP_IDENTIFIER = 12, + TLSEXT_CERTIFICATE_TYPES = 9, TLSEXT_SESSION_TICKET = 35 }; diff --git a/src/ssl/tls_messages.h b/src/ssl/tls_messages.h index 0b3553ac0..e7eaa56e1 100644 --- a/src/ssl/tls_messages.h +++ b/src/ssl/tls_messages.h @@ -51,6 +51,8 @@ class Client_Hello : public HandshakeMessage std::string hostname() const { return requested_hostname; } + std::string srp_identifier() const { return requested_srp_id; } + bool offered_suite(u16bit) const; Client_Hello(RandomNumberGenerator& rng, @@ -75,6 +77,7 @@ class Client_Hello : public HandshakeMessage std::vector<u16bit> suites; std::vector<byte> comp_algos; std::string requested_hostname; + std::string requested_srp_id; }; /** |