diff options
author | lloyd <[email protected]> | 2010-03-02 13:37:11 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2010-03-02 13:37:11 +0000 |
commit | d723232f03eb5073bdf245e0502434ebadbee1cd (patch) | |
tree | dee5bbea429c8a809594bc954a6efd2967f7ca5a /src/pubkey/ecc_key | |
parent | 44fa6060faac4ae69ad43620f48e5890f3e99384 (diff) |
Small cleanups
Diffstat (limited to 'src/pubkey/ecc_key')
-rw-r--r-- | src/pubkey/ecc_key/ecc_key.cpp | 2 | ||||
-rw-r--r-- | src/pubkey/ecc_key/ecc_key.h | 7 |
2 files changed, 8 insertions, 1 deletions
diff --git a/src/pubkey/ecc_key/ecc_key.cpp b/src/pubkey/ecc_key/ecc_key.cpp index 10968fa7e..e1559fc92 100644 --- a/src/pubkey/ecc_key/ecc_key.cpp +++ b/src/pubkey/ecc_key/ecc_key.cpp @@ -55,7 +55,7 @@ X509_Encoder* EC_PublicKey::x509_encoder() const AlgorithmIdentifier alg_id() const { return AlgorithmIdentifier(key->get_oid(), - key->domain().DER_encode(key->domain_format())); + key->DER_domain()); } MemoryVector<byte> key_bits() const diff --git a/src/pubkey/ecc_key/ecc_key.h b/src/pubkey/ecc_key/ecc_key.h index 653f97cab..1c41e5a1b 100644 --- a/src/pubkey/ecc_key/ecc_key.h +++ b/src/pubkey/ecc_key/ecc_key.h @@ -55,6 +55,13 @@ class BOTAN_DLL EC_PublicKey : public virtual Public_Key void set_parameter_encoding(EC_Domain_Params_Encoding enc); /** + * Return the DER encoding of this keys domain in whatever format + * is preset for this particular key + */ + MemoryVector<byte> DER_domain() const + { return domain().DER_encode(domain_format()); } + + /** * Get the domain parameter encoding to be used when encoding this key. * @result the encoding to use */ |