diff options
author | René Korthaus <[email protected]> | 2016-12-04 22:06:32 +0100 |
---|---|---|
committer | René Korthaus <[email protected]> | 2016-12-05 10:28:38 +0100 |
commit | 8690e4e616367c12412fb56bc1826be203a4614b (patch) | |
tree | dace4204f21931d458ceeadf351428f01792f215 /src/tests | |
parent | 61c4932f27c060a691ddc04fb75d227a1e8365dd (diff) |
Add Public_Key::subject_public_key()
Adds new Public_Key::subject_public_key() that returns
a X.509 SubjectPublicKey structure. Renames the current
Public_Key::x509_subject_public_key() to public_key_bits().
BER_encode() just invokes subject_public_key().
Diffstat (limited to 'src/tests')
-rw-r--r-- | src/tests/test_mceliece.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/tests/test_mceliece.cpp b/src/tests/test_mceliece.cpp index 1d581e938..26a404c13 100644 --- a/src/tests/test_mceliece.cpp +++ b/src/tests/test_mceliece.cpp @@ -62,7 +62,7 @@ class McEliece_Keygen_Encrypt_Test : public Text_Based_Test Test::Result result("McEliece keygen"); - result.test_eq("public key fingerprint", hash_bytes(mce_priv.x509_subject_public_key()), fprint_pub); + result.test_eq("public key fingerprint", hash_bytes(mce_priv.public_key_bits()), fprint_pub); result.test_eq("private key fingerprint", hash_bytes(mce_priv.pkcs8_private_key()), fprint_priv); rng.clear(); @@ -130,7 +130,7 @@ class McEliece_Tests : public Test if(!hash) throw Test_Error("Hash " + hash_algo + " not available"); - hash->update(key.x509_subject_public_key()); + hash->update(key.public_key_bits()); return Botan::hex_encode(hash->final()); } @@ -153,7 +153,7 @@ class McEliece_Tests : public Test Botan::McEliece_PrivateKey sk1(Test::rng(), param_sets[i].code_length, t); const Botan::McEliece_PublicKey& pk1 = sk1; - const std::vector<byte> pk_enc = pk1.x509_subject_public_key(); + const std::vector<byte> pk_enc = pk1.public_key_bits(); const Botan::secure_vector<byte> sk_enc = sk1.pkcs8_private_key(); Botan::McEliece_PublicKey pk(pk_enc); |