aboutsummaryrefslogtreecommitdiffstats
path: root/src/ssl
diff options
context:
space:
mode:
authorlloyd <[email protected]>2011-12-18 01:19:25 +0000
committerlloyd <[email protected]>2011-12-18 01:19:25 +0000
commit8809043895d1d4cf37ff476cb69c9277b33cc957 (patch)
tree72ca6a117cce901c9a36631422b1a7e5d88e1aac /src/ssl
parent5a76eb4c07f0caedde1a3d1d2824f2764a46a582 (diff)
parenta3d81efbd2c56749d4abf9e6a27cb36cbbb10702 (diff)
propagate from branch 'net.randombit.botan' (head 39f53266912f33dc48e942b1b865ddcd6af66d8d)
to branch 'net.randombit.botan.cxx11' (head 0bf26cec09f71e75c547b4ec53365748c6d80d86)
Diffstat (limited to 'src/ssl')
-rw-r--r--src/ssl/hello.cpp8
-rw-r--r--src/ssl/tls_magic.h2
-rw-r--r--src/ssl/tls_messages.h3
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;
};
/**