aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorlloyd <[email protected]>2012-02-07 19:50:28 +0000
committerlloyd <[email protected]>2012-02-07 19:50:28 +0000
commite943fc67962b6e4dc2c7c64707dc2cf062728520 (patch)
tree2f8cf3141f186c748f02d079fc18d71c37448f03 /src
parent8809043895d1d4cf37ff476cb69c9277b33cc957 (diff)
Fixes for GCC 4.7.0 (r183974)
Diffstat (limited to 'src')
-rw-r--r--src/build-data/cc/gcc.txt2
-rw-r--r--src/cert/x509cert/x509_obj.cpp2
-rw-r--r--src/constructs/srp6/srp6.cpp10
-rw-r--r--src/math/bigint/big_code.cpp4
4 files changed, 10 insertions, 8 deletions
diff --git a/src/build-data/cc/gcc.txt b/src/build-data/cc/gcc.txt
index be1830bb8..f8df398f1 100644
--- a/src/build-data/cc/gcc.txt
+++ b/src/build-data/cc/gcc.txt
@@ -1,6 +1,6 @@
macro_name GCC
-binary_name g++-4.6.0
+binary_name g++-4.7.0
compile_option "-c "
output_to_option "-o "
diff --git a/src/cert/x509cert/x509_obj.cpp b/src/cert/x509cert/x509_obj.cpp
index 13193f09c..eff8e2543 100644
--- a/src/cert/x509cert/x509_obj.cpp
+++ b/src/cert/x509cert/x509_obj.cpp
@@ -168,7 +168,7 @@ std::string X509_Object::hash_used_for_signature() const
*/
bool X509_Object::check_signature(Public_Key* pub_key) const
{
- std::auto_ptr<Public_Key> key(pub_key);
+ std::unique_ptr<Public_Key> key(pub_key);
return check_signature(*key);
}
diff --git a/src/constructs/srp6/srp6.cpp b/src/constructs/srp6/srp6.cpp
index 995244688..561e04d3f 100644
--- a/src/constructs/srp6/srp6.cpp
+++ b/src/constructs/srp6/srp6.cpp
@@ -20,7 +20,7 @@ BigInt hash_seq(const std::string& hash_id,
const BigInt& in1,
const BigInt& in2)
{
- std::auto_ptr<HashFunction> hash_fn(
+ std::unique_ptr<HashFunction> hash_fn(
global_state().algorithm_factory().make_hash_function(hash_id));
hash_fn->update(BigInt::encode_1363(in1, pad_to));
@@ -35,7 +35,7 @@ BigInt hash_seq(const std::string& hash_id,
const BigInt& in2,
const BigInt& in3)
{
- std::auto_ptr<HashFunction> hash_fn(
+ std::unique_ptr<HashFunction> hash_fn(
global_state().algorithm_factory().make_hash_function(hash_id));
hash_fn->update(BigInt::encode_1363(in1, pad_to));
@@ -50,7 +50,7 @@ BigInt compute_x(const std::string& hash_id,
const std::string& password,
const MemoryRegion<byte>& salt)
{
- std::auto_ptr<HashFunction> hash_fn(
+ std::unique_ptr<HashFunction> hash_fn(
global_state().algorithm_factory().make_hash_function(hash_id));
hash_fn->update(identifier);
@@ -103,7 +103,7 @@ SRP6_Client_Session:: step1(const std::string& identifier,
M1 = hash_seq(hash_id, p_bytes, A, B, S);
- return std::make_pair<BigInt, BigInt>(A, M1);
+ return std::make_pair(A, M1);
}
SymmetricKey SRP6_Client_Session::step2(const BigInt& M2)
@@ -171,7 +171,7 @@ std::pair<SymmetricKey, BigInt> SRP6_Server_Session::step2(const BigInt& A, cons
SymmetricKey Sk = BigInt::encode_1363(S, p_bytes);
- return std::make_pair<SymmetricKey, BigInt>(Sk, M2);
+ return std::make_pair(Sk, M2);
}
}
diff --git a/src/math/bigint/big_code.cpp b/src/math/bigint/big_code.cpp
index 75a310a7c..28614c9f1 100644
--- a/src/math/bigint/big_code.cpp
+++ b/src/math/bigint/big_code.cpp
@@ -111,7 +111,9 @@ BigInt BigInt::decode(const byte buf[], size_t length, Base base)
if(length % 2)
{
// Handle lack of leading 0
- const char buf0_with_leading_0[2] = { '0', buf[0] };
+ const char buf0_with_leading_0[2] =
+ { '0', static_cast<char>(buf[0]) };
+
binary = hex_decode(buf0_with_leading_0, 2);
binary += hex_decode(reinterpret_cast<const char*>(&buf[1]),