From 139d1c522c6a9df5124a741bc27f37153a907f39 Mon Sep 17 00:00:00 2001 From: lloyd Date: Thu, 15 Feb 2007 07:35:46 +0000 Subject: Clean up the definition of PKCS8_extract, though really this whole file needs to be rewritten. --- src/pkcs8.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/pkcs8.cpp') 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 PKCS8_extract(DataSource& source, SecureVector 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) { -- cgit v1.2.3