aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--checks/cvc_tests.cpp20
-rw-r--r--src/build-data/cc/gcc.txt2
-rw-r--r--src/cert/cvc/asn1_eac_tm.cpp73
-rw-r--r--src/cert/cvc/cvc_self.cpp6
-rw-r--r--src/cert/cvc/eac_asn_obj.h8
-rw-r--r--src/hash/keccak/keccak.cpp4
6 files changed, 19 insertions, 94 deletions
diff --git a/checks/cvc_tests.cpp b/checks/cvc_tests.cpp
index 90e5658a1..ecaf0c71b 100644
--- a/checks/cvc_tests.cpp
+++ b/checks/cvc_tests.cpp
@@ -162,12 +162,12 @@ void test_enc_gen_selfsigned(RandomNumberGenerator& rng)
}
CHECK(ill_date_exc2);
//cout << "readable = '" << cert_in.get_ced().readable_string() << "'\n";
- std::unique_ptr<Public_Key> p_pk = cert_in.subject_public_key();
- //unique_ptr<ECDSA_PublicKey> ecdsa_pk = dynamic_cast<auto_ptr<ECDSA_PublicKey> >(p_pk);
+ std::unique_ptr<Public_Key> p_pk(cert_in.subject_public_key());
ECDSA_PublicKey* p_ecdsa_pk = dynamic_cast<ECDSA_PublicKey*>(p_pk.get());
+
// let´s see if encoding is truely implicitca, because this is what the key should have
// been set to when decoding (see above)(because it has no domain params):
- //cout << "encoding = " << p_ecdsa_pk->get_parameter_encoding() << std::endl;
+
CHECK(p_ecdsa_pk->domain_format() == EC_DOMPAR_ENC_IMPLICITCA);
bool exc = false;
try
@@ -181,7 +181,7 @@ void test_enc_gen_selfsigned(RandomNumberGenerator& rng)
CHECK(exc);
// set them and try again
//cert_in.set_domain_parameters(dom_pars);
- std::unique_ptr<Public_Key> p_pk2 = cert_in.subject_public_key();
+ std::unique_ptr<Public_Key> p_pk2(cert_in.subject_public_key());
ECDSA_PublicKey* p_ecdsa_pk2 = dynamic_cast<ECDSA_PublicKey*>(p_pk2.get());
//p_ecdsa_pk2->set_domain_parameters(dom_pars);
CHECK(p_ecdsa_pk2->domain().get_order() == dom_pars.get_order());
@@ -212,7 +212,7 @@ void test_enc_gen_req(RandomNumberGenerator& rng)
// read and check signature...
EAC1_1_Req req_in(TEST_DATA_DIR "/my_cv_req.ber");
//req_in.set_domain_parameters(dom_pars);
- std::unique_ptr<Public_Key> p_pk = req_in.subject_public_key();
+ std::unique_ptr<Public_Key> p_pk(req_in.subject_public_key());
ECDSA_PublicKey* p_ecdsa_pk = dynamic_cast<ECDSA_PublicKey*>(p_pk.get());
//p_ecdsa_pk->set_domain_parameters(dom_pars);
CHECK(p_ecdsa_pk->domain().get_order() == dom_pars.get_order());
@@ -227,7 +227,7 @@ void test_cvc_req_ext(RandomNumberGenerator&)
EAC1_1_Req req_in(TEST_DATA_DIR "/DE1_flen_chars_cvcRequest_ECDSA.der");
EC_Domain_Params dom_pars(OID("1.3.36.3.3.2.8.1.1.5")); // "german curve"
//req_in.set_domain_parameters(dom_pars);
- std::unique_ptr<Public_Key> p_pk = req_in.subject_public_key();
+ std::unique_ptr<Public_Key> p_pk(req_in.subject_public_key());
ECDSA_PublicKey* p_ecdsa_pk = dynamic_cast<ECDSA_PublicKey*>(p_pk.get());
//p_ecdsa_pk->set_domain_parameters(dom_pars);
CHECK(p_ecdsa_pk->domain().get_order() == dom_pars.get_order());
@@ -388,11 +388,9 @@ void test_ver_cvca(RandomNumberGenerator&)
EAC1_1_CVC req_in(TEST_DATA_DIR "/cvca01.cv.crt");
- //unique_ptr<ECDSA_PublicKey> ecdsa_pk = dynamic_cast<auto_ptr<ECDSA_PublicKey> >(p_pk);
- //ECDSA_PublicKey* p_ecdsa_pk = dynamic_cast<ECDSA_PublicKey*>(p_pk.get());
bool exc = false;
- std::unique_ptr<Public_Key> p_pk2 = req_in.subject_public_key();
+ std::unique_ptr<Public_Key> p_pk2(req_in.subject_public_key());
ECDSA_PublicKey* p_ecdsa_pk2 = dynamic_cast<ECDSA_PublicKey*>(p_pk2.get());
bool ver_ec = req_in.check_signature(*p_pk2);
CHECK_MESSAGE(ver_ec, "could not positively verify correct selfsigned cvca certificate");
@@ -510,7 +508,7 @@ void test_cvc_chain(RandomNumberGenerator& rng)
CHECK(link12.check_signature(cvca_privk));
EAC1_1_CVC link12_reloaded(TEST_DATA_DIR "/cvc_chain_link12.cer");
EAC1_1_CVC cvca1_reloaded(TEST_DATA_DIR "/cvc_chain_cvca.cer");
- std::unique_ptr<Public_Key> cvca1_rel_pk = cvca1_reloaded.subject_public_key();
+ std::unique_ptr<Public_Key> cvca1_rel_pk(cvca1_reloaded.subject_public_key());
CHECK(link12_reloaded.check_signature(*cvca1_rel_pk));
// create first round dvca-req
@@ -540,7 +538,7 @@ void test_cvc_chain(RandomNumberGenerator& rng)
// verify the ado and sign the request too
- std::unique_ptr<Public_Key> ap_pk = dvca_cert1.subject_public_key();
+ std::unique_ptr<Public_Key> ap_pk(dvca_cert1.subject_public_key());
ECDSA_PublicKey* cert_pk = dynamic_cast<ECDSA_PublicKey*>(ap_pk.get());
//cert_pk->set_domain_parameters(dom_pars);
diff --git a/src/build-data/cc/gcc.txt b/src/build-data/cc/gcc.txt
index 6eeb837ed..2f71c7a18 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.5.1
+binary_name g++-4.5.2
compile_option "-c "
output_to_option "-o "
diff --git a/src/cert/cvc/asn1_eac_tm.cpp b/src/cert/cvc/asn1_eac_tm.cpp
index 91ccdac63..ec5ac429e 100644
--- a/src/cert/cvc/asn1_eac_tm.cpp
+++ b/src/cert/cvc/asn1_eac_tm.cpp
@@ -278,21 +278,6 @@ void EAC_Time::decode_from(BER_Decoder& source)
}
-u32bit EAC_Time::get_year() const
- {
- return year;
- }
-
-u32bit EAC_Time::get_month() const
- {
- return month;
- }
-
-u32bit EAC_Time::get_day() const
- {
- return day;
- }
-
/*
* make the value an octet string for encoding
*/
@@ -305,62 +290,4 @@ SecureVector<byte> EAC_Time::encoded_eac_time() const
return result;
}
-<<<<<<< variant A
-ASN1_Ced::ASN1_Ced(std::string const& str) :
- EAC_Time(str, ASN1_Tag(37))
- {}
-
-ASN1_Ced::ASN1_Ced(u64bit val) :
- EAC_Time(val, ASN1_Tag(37))
- {}
-
-ASN1_Ced::ASN1_Ced(EAC_Time const& other) :
- EAC_Time(other.get_year(),
- other.get_month(),
- other.get_day(),
- ASN1_Tag(37))
- {}
-
-ASN1_Cex::ASN1_Cex(std::string const& str) :
- EAC_Time(str, ASN1_Tag(36))
- {}
-
-ASN1_Cex::ASN1_Cex(u64bit val) :
- EAC_Time(val, ASN1_Tag(36))
- {}
-
-ASN1_Cex::ASN1_Cex(EAC_Time const& other) :
- EAC_Time(other.get_year(),
- other.get_month(),
- other.get_day(),
- ASN1_Tag(36))
- {}
-
->>>>>>> variant B
-####### Ancestor
-ASN1_Ced::ASN1_Ced(std::string const& str)
- : EAC_Time(str, ASN1_Tag(37))
- {}
-
-ASN1_Ced::ASN1_Ced(u64bit val)
- : EAC_Time(val, ASN1_Tag(37))
- {}
-
-ASN1_Ced::ASN1_Ced(EAC_Time const& other)
- : EAC_Time(other.get_year(), other.get_month(), other.get_day(), ASN1_Tag(37))
- {}
-
-ASN1_Cex::ASN1_Cex(std::string const& str)
- : EAC_Time(str, ASN1_Tag(36))
- {}
-
-ASN1_Cex::ASN1_Cex(u64bit val)
- : EAC_Time(val, ASN1_Tag(36))
- {}
-
-ASN1_Cex::ASN1_Cex(EAC_Time const& other)
- : EAC_Time(other.get_year(), other.get_month(), other.get_day(), ASN1_Tag(36))
- {}
-
-======= end
}
diff --git a/src/cert/cvc/cvc_self.cpp b/src/cert/cvc/cvc_self.cpp
index 5b665fa33..4b6c5af8c 100644
--- a/src/cert/cvc/cvc_self.cpp
+++ b/src/cert/cvc/cvc_self.cpp
@@ -232,7 +232,7 @@ EAC1_1_CVC link_cvca(EAC1_1_CVC const& signer,
AlgorithmIdentifier sig_algo = signer.signature_algorithm();
std::string padding_and_hash = padding_and_hash_from_oid(sig_algo.oid);
PK_Signer pk_signer(*priv_key, padding_and_hash);
- std::unique_ptr<Public_Key> pk = signee.subject_public_key();
+ std::unique_ptr<Public_Key> pk(signee.subject_public_key());
ECDSA_PublicKey* subj_pk = dynamic_cast<ECDSA_PublicKey*>(pk.get());
subj_pk->set_parameter_encoding(EC_DOMPAR_ENC_EXPLICIT);
@@ -272,9 +272,9 @@ EAC1_1_CVC sign_request(EAC1_1_CVC const& signer_cert,
ASN1_Chr chr(chr_str);
std::string padding_and_hash = padding_and_hash_from_oid(signee.signature_algorithm().oid);
PK_Signer pk_signer(*priv_key, padding_and_hash);
- std::unique_ptr<Public_Key> pk = signee.subject_public_key();
+ std::unique_ptr<Public_Key> pk(signee.subject_public_key());
ECDSA_PublicKey* subj_pk = dynamic_cast<ECDSA_PublicKey*>(pk.get());
- std::unique_ptr<Public_Key> signer_pk = signer_cert.subject_public_key();
+ std::unique_ptr<Public_Key> signer_pk(signer_cert.subject_public_key());
// for the case that the domain parameters are not set...
// (we use those from the signer because they must fit)
diff --git a/src/cert/cvc/eac_asn_obj.h b/src/cert/cvc/eac_asn_obj.h
index dc4f82578..54a9f1517 100644
--- a/src/cert/cvc/eac_asn_obj.h
+++ b/src/cert/cvc/eac_asn_obj.h
@@ -116,7 +116,7 @@ class BOTAN_DLL ASN1_Ced : public EAC_Time
* @param str a string in the format "yyyy mm dd",
* e.g. "2007 08 01"
*/
- ASN1_Ced(std::string const& str = "") :
+ ASN1_Ced(const std::string& str = "") :
EAC_Time(str, ASN1_Tag(37)) {}
/**
@@ -129,7 +129,7 @@ class BOTAN_DLL ASN1_Ced : public EAC_Time
* Copy constructor (for general EAC_Time objects).
* @param other the object to copy from
*/
- ASN1_Ced(EAC_Time const& other) :
+ ASN1_Ced(const EAC_Time& other) :
EAC_Time(other.get_year(), other.get_month(), other.get_day(),
ASN1_Tag(37))
{}
@@ -147,13 +147,13 @@ class BOTAN_DLL ASN1_Cex : public EAC_Time
* @param str a string in the format "yyyy mm dd",
* e.g. "2007 08 01"
*/
- ASN1_Cex(std::string const& str = "") :
+ ASN1_Cex(const std::string& str = "") :
EAC_Time(str, ASN1_Tag(36)) {}
ASN1_Cex(const std::chrono::system_clock::time_point& time) :
EAC_Time(time, ASN1_Tag(36)) {}
- ASN1_Cex(EAC_Time const& other) :
+ ASN1_Cex(const EAC_Time& other) :
EAC_Time(other.get_year(), other.get_month(), other.get_day(),
ASN1_Tag(36))
{}
diff --git a/src/hash/keccak/keccak.cpp b/src/hash/keccak/keccak.cpp
index 922167b61..107055509 100644
--- a/src/hash/keccak/keccak.cpp
+++ b/src/hash/keccak/keccak.cpp
@@ -112,12 +112,12 @@ Keccak_1600::Keccak_1600(size_t output_bits) :
if(output_bits != 224 && output_bits != 256 &&
output_bits != 384 && output_bits != 512)
throw Invalid_Argument("Keccak_1600: Invalid output length " +
- to_string(output_bits));
+ std::to_string(output_bits));
}
std::string Keccak_1600::name() const
{
- return "Keccak-1600(" + to_string(output_bits) + ")";
+ return "Keccak-1600(" + std::to_string(output_bits) + ")";
}
HashFunction* Keccak_1600::clone() const