aboutsummaryrefslogtreecommitdiffstats
path: root/src/pkcs8.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2007-02-15 07:35:46 +0000
committerlloyd <[email protected]>2007-02-15 07:35:46 +0000
commit139d1c522c6a9df5124a741bc27f37153a907f39 (patch)
tree04716deb43e8b4971da387cd5d85b0537d25a463 /src/pkcs8.cpp
parentdea2e28415d18ad98d0dc06fa1d635ba1025ffb2 (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.cpp9
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)
{