aboutsummaryrefslogtreecommitdiffstats
path: root/src/pubkey/pk_codecs/pkcs8.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2009-09-08 23:59:48 +0000
committerlloyd <[email protected]>2009-09-08 23:59:48 +0000
commit91c7165b698e34c9bbdbcaafe1dd28459fc8c804 (patch)
treedbe6b0152dbd0e035eebefdf8c98497adec2816d /src/pubkey/pk_codecs/pkcs8.cpp
parent166e979eebe6e3f136df4deba626b584e1d735ae (diff)
parentabcfd1cf4b351f856c2df11ed1cd972a3a5155a9 (diff)
propagate from branch 'net.randombit.botan' (head 5cadcc57872bef55226579df57349fe09a93d1f5)
to branch 'net.randombit.botan.c++0x' (head d1747f0394aa4442e5b32b9102b830e1a86f0e5a)
Diffstat (limited to 'src/pubkey/pk_codecs/pkcs8.cpp')
-rw-r--r--src/pubkey/pk_codecs/pkcs8.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/pubkey/pk_codecs/pkcs8.cpp b/src/pubkey/pk_codecs/pkcs8.cpp
index 8a464ecfe..87f05da92 100644
--- a/src/pubkey/pk_codecs/pkcs8.cpp
+++ b/src/pubkey/pk_codecs/pkcs8.cpp
@@ -89,7 +89,7 @@ SecureVector<byte> PKCS8_decode(DataSource& source, const User_Interface& ui,
if(is_encrypted)
{
DataSource_Memory params(pbe_alg_id.parameters);
- std::auto_ptr<PBE> pbe(get_pbe(pbe_alg_id.oid, params));
+ std::unique_ptr<PBE> pbe(get_pbe(pbe_alg_id.oid, params));
User_Interface::UI_Result result = User_Interface::OK;
const std::string passphrase =
@@ -138,7 +138,7 @@ SecureVector<byte> PKCS8_decode(DataSource& source, const User_Interface& ui,
*/
void encode(const Private_Key& key, Pipe& pipe, X509_Encoding encoding)
{
- std::auto_ptr<PKCS8_Encoder> encoder(key.pkcs8_encoder());
+ std::unique_ptr<PKCS8_Encoder> encoder(key.pkcs8_encoder());
if(!encoder.get())
throw Encoding_Error("PKCS8::encode: Key does not support encoding");
@@ -175,7 +175,7 @@ void encrypt_key(const Private_Key& key,
encode(key, raw_key, RAW_BER);
raw_key.end_msg();
- std::auto_ptr<PBE> pbe(get_pbe(((pbe_algo != "") ? pbe_algo : DEFAULT_PBE)));
+ std::unique_ptr<PBE> pbe(get_pbe(((pbe_algo != "") ? pbe_algo : DEFAULT_PBE)));
pbe->new_params(rng);
pbe->set_key(pass);
@@ -244,13 +244,13 @@ Private_Key* load_key(DataSource& source,
throw PKCS8_Exception("Unknown algorithm OID: " +
alg_id.oid.as_string());
- std::auto_ptr<Private_Key> key(get_private_key(alg_name));
+ std::unique_ptr<Private_Key> key(get_private_key(alg_name));
if(!key.get())
throw PKCS8_Exception("Unknown PK algorithm/OID: " + alg_name + ", " +
alg_id.oid.as_string());
- std::auto_ptr<PKCS8_Decoder> decoder(key->pkcs8_decoder(rng));
+ std::unique_ptr<PKCS8_Decoder> decoder(key->pkcs8_decoder(rng));
if(!decoder.get())
throw Decoding_Error("Key does not support PKCS #8 decoding");