aboutsummaryrefslogtreecommitdiffstats
path: root/checks/ecdsa.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2010-03-01 23:05:00 +0000
committerlloyd <[email protected]>2010-03-01 23:05:00 +0000
commit3fb831f2e24ec1e3d7f8902d4aa5adceaf366f01 (patch)
tree226c329e44047b418add41e3ddfc58c322229409 /checks/ecdsa.cpp
parentb789c87b7c96dbdb00839996c9603a3f0921b25b (diff)
Kill get_EC_Dom_Pars_by_oid
Diffstat (limited to 'checks/ecdsa.cpp')
-rw-r--r--checks/ecdsa.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/checks/ecdsa.cpp b/checks/ecdsa.cpp
index f9dcf5597..d76994937 100644
--- a/checks/ecdsa.cpp
+++ b/checks/ecdsa.cpp
@@ -47,7 +47,7 @@ void test_hash_larger_than_n(RandomNumberGenerator& rng)
{
std::cout << "." << std::flush;
- EC_Domain_Params dom_pars(get_EC_Dom_Pars_by_oid("1.3.132.0.8"));
+ EC_Domain_Params dom_pars(OID("1.3.132.0.8"));
// n:
// 0x0100000000000000000001f4c8f927aed3ca752257 // 21 bytes
// -> shouldn't work with SHA224 which outputs 23 bytes
@@ -124,7 +124,7 @@ void test_message_larger_than_n(RandomNumberGenerator& rng)
{
std::cout << "." << std::flush;
- EC_Domain_Params dom_pars(get_EC_Dom_Pars_by_oid("1.3.132.0.8"));
+ EC_Domain_Params dom_pars(OID("1.3.132.0.8"));
ECDSA_PrivateKey priv_key(rng, dom_pars);
std::string str_message = ("12345678901234567890abcdef1212345678901234567890abcdef1212345678901234567890abcdef12");
@@ -219,7 +219,7 @@ bool test_ec_sign(RandomNumberGenerator& rng)
try
{
- EC_Domain_Params dom_pars(get_EC_Dom_Pars_by_oid("1.3.132.0.8"));
+ EC_Domain_Params dom_pars(OID("1.3.132.0.8"));
ECDSA_PrivateKey priv_key(rng, dom_pars);
std::string pem_encoded_key = PKCS8::PEM_encode(priv_key);
@@ -283,7 +283,7 @@ void test_create_pkcs8(RandomNumberGenerator& rng)
std::ofstream rsa_priv_key(TEST_DATA_DIR "/rsa_private.pkcs8.pem");
rsa_priv_key << PKCS8::PEM_encode(rsa_key);
- EC_Domain_Params dom_pars(get_EC_Dom_Pars_by_oid("1.3.132.0.8"));
+ EC_Domain_Params dom_pars(OID("1.3.132.0.8"));
ECDSA_PrivateKey key(rng, dom_pars);
// later used by other tests :(
@@ -300,7 +300,7 @@ void test_create_and_verify(RandomNumberGenerator& rng)
{
std::cout << "." << std::flush;
- EC_Domain_Params dom_pars(get_EC_Dom_Pars_by_oid("1.3.132.0.8"));
+ EC_Domain_Params dom_pars(OID("1.3.132.0.8"));
ECDSA_PrivateKey key(rng, dom_pars);
std::ofstream priv_key(TEST_DATA_DIR "/dompar_private.pkcs8.pem");
priv_key << PKCS8::PEM_encode(key);
@@ -389,7 +389,8 @@ void test_curve_registry(RandomNumberGenerator& rng)
try
{
- EC_Domain_Params dom_pars(get_EC_Dom_Pars_by_oid(oids[i]));
+ OID oid(oids[i]);
+ EC_Domain_Params dom_pars(oid);
dom_pars.get_base_point().check_invariants();
ECDSA_PrivateKey key(rng, dom_pars);