aboutsummaryrefslogtreecommitdiffstats
path: root/checks
diff options
context:
space:
mode:
Diffstat (limited to 'checks')
-rw-r--r--checks/cvc_tests.cpp12
-rw-r--r--checks/ecdsa.cpp3
2 files changed, 7 insertions, 8 deletions
diff --git a/checks/cvc_tests.cpp b/checks/cvc_tests.cpp
index c232c4d6b..26ead3216 100644
--- a/checks/cvc_tests.cpp
+++ b/checks/cvc_tests.cpp
@@ -169,11 +169,11 @@ void test_enc_gen_selfsigned(RandomNumberGenerator& rng)
// 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->get_parameter_encoding() == EC_DOMPAR_ENC_IMPLICITCA);
+ CHECK(p_ecdsa_pk->domain_format() == EC_DOMPAR_ENC_IMPLICITCA);
bool exc = false;
try
{
- std::cout << "order = " << p_ecdsa_pk->domain_parameters().get_order() << std::endl;
+ std::cout << "order = " << p_ecdsa_pk->domain().get_order() << std::endl;
}
catch (Invalid_State)
{
@@ -185,7 +185,7 @@ void test_enc_gen_selfsigned(RandomNumberGenerator& rng)
std::auto_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_parameters().get_order() == dom_pars.get_order());
+ CHECK(p_ecdsa_pk2->domain().get_order() == dom_pars.get_order());
bool ver_ec = cert_in.check_signature(*p_pk2);
CHECK_MESSAGE(ver_ec, "could not positively verify correct selfsigned cvc certificate");
}
@@ -216,7 +216,7 @@ void test_enc_gen_req(RandomNumberGenerator& rng)
std::auto_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_parameters().get_order() == dom_pars.get_order());
+ CHECK(p_ecdsa_pk->domain().get_order() == dom_pars.get_order());
bool ver_ec = req_in.check_signature(*p_pk);
CHECK_MESSAGE(ver_ec, "could not positively verify correct selfsigned (created by myself) cvc request");
}
@@ -231,7 +231,7 @@ void test_cvc_req_ext(RandomNumberGenerator&)
std::auto_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_parameters().get_order() == dom_pars.get_order());
+ CHECK(p_ecdsa_pk->domain().get_order() == dom_pars.get_order());
bool ver_ec = req_in.check_signature(*p_pk);
CHECK_MESSAGE(ver_ec, "could not positively verify correct selfsigned (external testdata) cvc request");
}
@@ -401,7 +401,7 @@ void test_ver_cvca(RandomNumberGenerator&)
try
{
- p_ecdsa_pk2->domain_parameters().get_order();
+ p_ecdsa_pk2->domain().get_order();
}
catch (Invalid_State)
{
diff --git a/checks/ecdsa.cpp b/checks/ecdsa.cpp
index d76994937..10c16c162 100644
--- a/checks/ecdsa.cpp
+++ b/checks/ecdsa.cpp
@@ -491,8 +491,7 @@ void test_non_init_ecdsa_keys(RandomNumberGenerator& rng)
std::cout << "." << std::flush;
std::auto_ptr<PKCS8_PrivateKey> loaded_key(PKCS8::load_key(TEST_DATA_DIR "/wo_dompar_private.pkcs8.pem", rng));
- //ECDSA_PrivateKey* loaded_ec_key = dynamic_cast<ECDSA_PrivateKey*>(loaded_key.get());
- //CHECK_MESSAGE(loaded_ec_key, "the loaded key could not be converted into an ECDSA_PrivateKey");
+
std::string str_message = ("12345678901234567890abcdef12");
ECDSA_PrivateKey empty_priv;
ECDSA_PublicKey empty_pub;