aboutsummaryrefslogtreecommitdiffstats
path: root/src/pubkey/ecc_key/ecc_key.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/pubkey/ecc_key/ecc_key.cpp')
-rw-r--r--src/pubkey/ecc_key/ecc_key.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/pubkey/ecc_key/ecc_key.cpp b/src/pubkey/ecc_key/ecc_key.cpp
index 22d7aceb4..4a0b20d2f 100644
--- a/src/pubkey/ecc_key/ecc_key.cpp
+++ b/src/pubkey/ecc_key/ecc_key.cpp
@@ -35,6 +35,11 @@ EC_PublicKey::EC_PublicKey(const EC_Domain_Params& dom_par,
}
}
+AlgorithmIdentifier EC_PublicKey::algorithm_identifier() const
+ {
+ return AlgorithmIdentifier(get_oid(), DER_domain());
+ }
+
void EC_PublicKey::X509_load_hook()
{
try
@@ -54,8 +59,7 @@ X509_Encoder* EC_PublicKey::x509_encoder() const
public:
AlgorithmIdentifier alg_id() const
{
- return AlgorithmIdentifier(key->get_oid(),
- key->DER_domain());
+ return key->algorithm_identifier();
}
MemoryVector<byte> key_bits() const
@@ -161,8 +165,7 @@ PKCS8_Encoder* EC_PrivateKey::pkcs8_encoder() const
public:
AlgorithmIdentifier alg_id() const
{
- return AlgorithmIdentifier(key->get_oid(),
- key->domain().DER_encode(EC_DOMPAR_ENC_EXPLICIT));
+ return key->algorithm_identifier();
}
MemoryVector<byte> key_bits() const