aboutsummaryrefslogtreecommitdiffstats
path: root/checks/x509.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2010-03-04 02:07:14 +0000
committerlloyd <[email protected]>2010-03-04 02:07:14 +0000
commitc58d02b152b11bae78985aa441560f49ef6b5d09 (patch)
treec01bbbbe6ee86f60faf238a271c28dd03326ac5c /checks/x509.cpp
parentf109029f5f1cc33512091e228e6ee6532058c42f (diff)
Add a new function to public key x509_subject_public_key which returns
what x509_encoder()->key_bits() used to return. This is much simpler than using the explicit encoder objects. Remove X509_Encoder entirely.
Diffstat (limited to 'checks/x509.cpp')
-rw-r--r--checks/x509.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/checks/x509.cpp b/checks/x509.cpp
index 0891d8b35..96d99eee2 100644
--- a/checks/x509.cpp
+++ b/checks/x509.cpp
@@ -40,15 +40,11 @@ namespace {
u64bit key_id(const Public_Key* key)
{
- std::auto_ptr<X509_Encoder> encoder(key->x509_encoder());
- if(!encoder.get())
- throw Internal_Error("Public_Key:key_id: No encoder found");
-
Pipe pipe(new Hash_Filter("SHA-1", 8));
pipe.start_msg();
pipe.write(key->algo_name());
- pipe.write(encoder->alg_id().parameters);
- pipe.write(encoder->key_bits());
+ pipe.write(key->algorithm_identifier().parameters);
+ pipe.write(key->x509_subject_public_key());
pipe.end_msg();
SecureVector<byte> output = pipe.read_all();