aboutsummaryrefslogtreecommitdiffstats
path: root/src/tls/s_kex.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2012-02-20 18:33:49 +0000
committerlloyd <[email protected]>2012-02-20 18:33:49 +0000
commit7fb2de6b49d8bf42ede7b4dfda7c358bb67e5c9f (patch)
tree32319c62e13572276b52c467e4c53d4646de6cc9 /src/tls/s_kex.cpp
parent8c2dc1a6c3bf352a56622d569dc855ca8d6ab5e0 (diff)
Merge fixups. Add locking to default session manager. Use chrono lib
and unique_ptr.
Diffstat (limited to 'src/tls/s_kex.cpp')
-rw-r--r--src/tls/s_kex.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/tls/s_kex.cpp b/src/tls/s_kex.cpp
index 6a5cdfa33..945c574b9 100644
--- a/src/tls/s_kex.cpp
+++ b/src/tls/s_kex.cpp
@@ -46,7 +46,7 @@ Server_Key_Exchange::Server_Key_Exchange(Record_Writer& writer,
if(kex_algo == "DH" || kex_algo == "DHE_PSK")
{
- std::auto_ptr<DH_PrivateKey> dh(new DH_PrivateKey(rng, policy.dh_group()));
+ std::unique_ptr<DH_PrivateKey> dh(new DH_PrivateKey(rng, policy.dh_group()));
append_tls_length_value(m_params, BigInt::encode(dh->get_domain().get_p()), 2);
append_tls_length_value(m_params, BigInt::encode(dh->get_domain().get_g()), 2);
@@ -69,7 +69,7 @@ Server_Key_Exchange::Server_Key_Exchange(Record_Writer& writer,
EC_Group ec_group(curve_name);
- std::auto_ptr<ECDH_PrivateKey> ecdh(new ECDH_PrivateKey(rng, ec_group));
+ std::unique_ptr<ECDH_PrivateKey> ecdh(new ECDH_PrivateKey(rng, ec_group));
const std::string ecdh_domain_oid = ecdh->domain().get_oid();
const std::string domain = OIDS::lookup(OID(ecdh_domain_oid));
@@ -159,7 +159,7 @@ Server_Key_Exchange::Server_Key_Exchange(const MemoryRegion<byte>& buf,
if(name == "")
throw Decoding_Error("Server_Key_Exchange: Server sent unknown named curve " +
- to_string(curve_id));
+ std::to_string(curve_id));
m_params.push_back(curve_type);
m_params.push_back(get_byte(0, curve_id));