diff options
author | lloyd <[email protected]> | 2007-02-15 07:35:46 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2007-02-15 07:35:46 +0000 |
commit | 139d1c522c6a9df5124a741bc27f37153a907f39 (patch) | |
tree | 04716deb43e8b4971da387cd5d85b0537d25a463 /src/pkcs8.cpp | |
parent | dea2e28415d18ad98d0dc06fa1d635ba1025ffb2 (diff) |
Clean up the definition of PKCS8_extract, though really this whole file
needs to be rewritten.
Diffstat (limited to 'src/pkcs8.cpp')
-rw-r--r-- | src/pkcs8.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/pkcs8.cpp b/src/pkcs8.cpp index f7516ede3..5815e4f67 100644 --- a/src/pkcs8.cpp +++ b/src/pkcs8.cpp @@ -29,11 +29,10 @@ SecureVector<byte> PKCS8_extract(DataSource& source, SecureVector<byte> enc_pkcs8_key; try { - BER_Decoder decoder(source); - BER_Decoder sequence = decoder.start_cons(SEQUENCE); - sequence.decode(alg_id); - sequence.decode(enc_pkcs8_key, OCTET_STRING); - sequence.verify_end(); + BER_Decoder(source).start_cons(SEQUENCE) + .decode(alg_id) + .decode(enc_pkcs8_key, OCTET_STRING) + .verify_end(); } catch(Decoding_Error) { |