diff options
author | lloyd <[email protected]> | 2010-06-15 00:37:27 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2010-06-15 00:37:27 +0000 |
commit | e9e13fcf62ef8c71576d6bebaa3e8c6b361ec935 (patch) | |
tree | a97602471dbe2d3b589ff4db27c4d68557471fe3 /src/pubkey/pkcs8.cpp | |
parent | 0d26fdf3e03c7a34c33307352bcc27e79d493eb3 (diff) |
Simplify PKCS8::copy_key
Diffstat (limited to 'src/pubkey/pkcs8.cpp')
-rw-r--r-- | src/pubkey/pkcs8.cpp | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/pubkey/pkcs8.cpp b/src/pubkey/pkcs8.cpp index 00993223f..243d3a6b3 100644 --- a/src/pubkey/pkcs8.cpp +++ b/src/pubkey/pkcs8.cpp @@ -257,13 +257,7 @@ Private_Key* load_key(const std::string& fsname, Private_Key* copy_key(const Private_Key& key, RandomNumberGenerator& rng) { - Pipe bits; - - bits.start_msg(); - PKCS8::encode(key, bits); - bits.end_msg(); - - DataSource_Memory source(bits.read_all()); + DataSource_Memory source(PEM_encode(key)); return PKCS8::load_key(source, rng); } |