diff options
author | lloyd <[email protected]> | 2010-03-04 01:53:35 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2010-03-04 01:53:35 +0000 |
commit | f109029f5f1cc33512091e228e6ee6532058c42f (patch) | |
tree | 203d32fec16d05a2fc6c6f72346cb13a2796c71e /src/cert | |
parent | 547e295717780c28878f17b7273a7d60c1bf39c6 (diff) |
Add a new function to Public_Key, algorithm_identifier(), which just
returns the AlgorithmIdentifier representing this scheme (OID + domain
params if any).
Diffstat (limited to 'src/cert')
-rw-r--r-- | src/cert/x509/x509_ca.cpp | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/cert/x509/x509_ca.cpp b/src/cert/x509/x509_ca.cpp index 16b7b3b9b..9af5aa449 100644 --- a/src/cert/x509/x509_ca.cpp +++ b/src/cert/x509/x509_ca.cpp @@ -274,13 +274,7 @@ PK_Signer* choose_sig_format(const Private_Key& key, padding = padding + '(' + proto_hash->name() + ')'; sig_algo.oid = OIDS::lookup(algo_name + "/" + padding); - - std::auto_ptr<X509_Encoder> encoding(key.x509_encoder()); - if(!encoding.get()) - throw Encoding_Error("Key " + algo_name + " does not support " - "X.509 encoding"); - - sig_algo.parameters = encoding->alg_id().parameters; + sig_algo.parameters = key.algorithm_identifier().parameters; const PK_Signing_Key& sig_key = dynamic_cast<const PK_Signing_Key&>(key); |