aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/cert/cvc/cvc_ado.cpp2
-rw-r--r--src/cert/cvc/cvc_gen_cert.h2
-rw-r--r--src/cert/cvc/cvc_self.cpp4
-rw-r--r--src/math/gfpmath/point_gfp.cpp2
-rw-r--r--src/pubkey/gost_3410/gost_3410.cpp13
-rw-r--r--src/ssl/rec_wri.cpp2
-rw-r--r--src/ssl/tls_suites.cpp2
7 files changed, 13 insertions, 14 deletions
diff --git a/src/cert/cvc/cvc_ado.cpp b/src/cert/cvc/cvc_ado.cpp
index 782922354..fd5b80f13 100644
--- a/src/cert/cvc/cvc_ado.cpp
+++ b/src/cert/cvc/cvc_ado.cpp
@@ -51,7 +51,7 @@ MemoryVector<byte> EAC1_1_ADO::make_signed(
RandomNumberGenerator& rng)
{
SecureVector<byte> concat_sig =
- EAC1_1_obj<EAC1_1_ADO>::make_signature(signer.get(), tbs_bits, rng);
+ EAC1_1_obj<EAC1_1_ADO>::make_signature(signer, tbs_bits, rng);
return DER_Encoder()
.start_cons(ASN1_Tag(7), APPLICATION)
diff --git a/src/cert/cvc/cvc_gen_cert.h b/src/cert/cvc/cvc_gen_cert.h
index d64812e1e..ab6e22ff0 100644
--- a/src/cert/cvc/cvc_gen_cert.h
+++ b/src/cert/cvc/cvc_gen_cert.h
@@ -107,7 +107,7 @@ template<typename Derived> MemoryVector<byte> EAC1_1_gen_CVC<Derived>::make_sign
const MemoryRegion<byte>& tbs_bits,
RandomNumberGenerator& rng) // static
{
- SecureVector<byte> concat_sig = EAC1_1_obj<Derived>::make_signature(signer.get(), tbs_bits, rng);
+ SecureVector<byte> concat_sig = EAC1_1_obj<Derived>::make_signature(signer, tbs_bits, rng);
return DER_Encoder()
.start_cons(ASN1_Tag(33), APPLICATION)
diff --git a/src/cert/cvc/cvc_self.cpp b/src/cert/cvc/cvc_self.cpp
index 8d782983d..5ec7d7d32 100644
--- a/src/cert/cvc/cvc_self.cpp
+++ b/src/cert/cvc/cvc_self.cpp
@@ -134,7 +134,7 @@ EAC1_1_Req create_cvc_req(Private_Key const& key,
.encode(chr)
.get_contents();
- MemoryVector<byte> signed_cert = EAC1_1_gen_CVC<EAC1_1_Req>::make_signed(signer, EAC1_1_gen_CVC<EAC1_1_Req>::build_cert_body(tbs), rng);
+ MemoryVector<byte> signed_cert = EAC1_1_gen_CVC<EAC1_1_Req>::make_signed(*signer.get(), EAC1_1_gen_CVC<EAC1_1_Req>::build_cert_body(tbs), rng);
DataSource_Memory source(signed_cert);
return EAC1_1_Req(source);
@@ -158,7 +158,7 @@ EAC1_1_ADO create_ado_req(Private_Key const& key,
SecureVector<byte> tbs_bits = req.BER_encode();
tbs_bits.append(DER_Encoder().encode(car).get_contents());
- MemoryVector<byte> signed_cert = EAC1_1_ADO::make_signed(signer, tbs_bits, rng);
+ MemoryVector<byte> signed_cert = EAC1_1_ADO::make_signed(*signer.get(), tbs_bits, rng);
DataSource_Memory source(signed_cert);
return EAC1_1_ADO(source);
diff --git a/src/math/gfpmath/point_gfp.cpp b/src/math/gfpmath/point_gfp.cpp
index 00331f25b..4b2de7913 100644
--- a/src/math/gfpmath/point_gfp.cpp
+++ b/src/math/gfpmath/point_gfp.cpp
@@ -13,7 +13,7 @@
namespace Botan {
// construct the point at infinity or a random point
-nPointGFp::PointGFp(const CurveGFp& curve) :
+PointGFp::PointGFp(const CurveGFp& curve) :
mC(curve),
mX(curve.get_p(), 0),
mY(curve.get_p(), 1),
diff --git a/src/pubkey/gost_3410/gost_3410.cpp b/src/pubkey/gost_3410/gost_3410.cpp
index c2ddabe63..21e2653c9 100644
--- a/src/pubkey/gost_3410/gost_3410.cpp
+++ b/src/pubkey/gost_3410/gost_3410.cpp
@@ -19,7 +19,7 @@ namespace Botan {
GOST_3410_PrivateKey::GOST_3410_PrivateKey(RandomNumberGenerator& rng,
const EC_Domain_Params& dom_pars)
{
- mp_dom_pars = std::auto_ptr<EC_Domain_Params>(new EC_Domain_Params(dom_pars));
+ mp_dom_pars = std::unique_ptr<EC_Domain_Params>(new EC_Domain_Params(dom_pars));
generate_private_key(rng);
try
@@ -35,10 +35,10 @@ GOST_3410_PrivateKey::GOST_3410_PrivateKey(RandomNumberGenerator& rng,
GOST_3410_PrivateKey::GOST_3410_PrivateKey(const EC_Domain_Params& domain,
const BigInt& x)
{
- mp_dom_pars = std::auto_ptr<EC_Domain_Params>(new EC_Domain_Params(domain));
+ mp_dom_pars = std::unique_ptr<EC_Domain_Params>(new EC_Domain_Params(domain));
m_private_value = x;
- mp_public_point = std::auto_ptr<PointGFp>(new PointGFp (mp_dom_pars->get_base_point()));
+ mp_public_point = std::unique_ptr<PointGFp>(new PointGFp (mp_dom_pars->get_base_point()));
mp_public_point->mult_this_secure(m_private_value,
mp_dom_pars->get_order(),
mp_dom_pars->get_order()-1);
@@ -173,9 +173,8 @@ void GOST_3410_PublicKey::set_domain_parameters(const EC_Domain_Params& dom_pars
throw Invalid_State("EC_PublicKey::set_domain_parameters(): point does not lie on provided curve");
}
- std::auto_ptr<EC_Domain_Params> p_tmp_pars(new EC_Domain_Params(dom_pars));
mp_public_point.reset(new PointGFp(tmp_pp));
- mp_dom_pars = p_tmp_pars;
+ mp_dom_pars.reset(new EC_Domain_Params(dom_pars));
}
void GOST_3410_PublicKey::set_all_values(const GOST_3410_PublicKey& other)
@@ -242,8 +241,8 @@ bool GOST_3410_PublicKey::verify(const byte msg[], u32bit msg_len,
GOST_3410_PublicKey::GOST_3410_PublicKey(const EC_Domain_Params& dom_par,
const PointGFp& public_point)
{
- mp_dom_pars = std::auto_ptr<EC_Domain_Params>(new EC_Domain_Params(dom_par));
- mp_public_point = std::auto_ptr<PointGFp>(new PointGFp(public_point));
+ mp_dom_pars = std::unique_ptr<EC_Domain_Params>(new EC_Domain_Params(dom_par));
+ mp_public_point = std::unique_ptr<PointGFp>(new PointGFp(public_point));
m_param_enc = ENC_EXPLICIT;
}
diff --git a/src/ssl/rec_wri.cpp b/src/ssl/rec_wri.cpp
index 258b4ec17..842b2698c 100644
--- a/src/ssl/rec_wri.cpp
+++ b/src/ssl/rec_wri.cpp
@@ -250,7 +250,7 @@ void Record_Writer::send_record(byte type, byte major, byte minor,
*/
void Record_Writer::alert(Alert_Level level, Alert_Type type)
{
- byte alert[2] = { level, type };
+ byte alert[2] = { (byte)level, (byte)type };
send(ALERT, alert, sizeof(alert));
flush();
}
diff --git a/src/ssl/tls_suites.cpp b/src/ssl/tls_suites.cpp
index 26fa75428..a168dac0a 100644
--- a/src/ssl/tls_suites.cpp
+++ b/src/ssl/tls_suites.cpp
@@ -51,7 +51,7 @@ CipherSuite::CipherSuite(u16bit suite_code)
if(suite_string == "")
throw Invalid_Argument("Unknown ciphersuite: " +
- to_string(suite_code));
+ std::to_string(suite_code));
std::vector<std::string> suite_info = split_on(suite_string, '/');