aboutsummaryrefslogtreecommitdiffstats
path: root/src/cmd
diff options
context:
space:
mode:
authorlloyd <[email protected]>2015-03-08 14:15:34 +0000
committerlloyd <[email protected]>2015-03-08 14:15:34 +0000
commitf0ccd62149e466d4fbf1fb2c57227c4d3cee190c (patch)
tree1db968e1b23c96dba5e830247684a2a90459b084 /src/cmd
parent6fcdb56ee42078172d44529d55a57bf377f5ae53 (diff)
Fix memory leak in TLS tests. Remove last few remaining uses of auto_ptr.
Diffstat (limited to 'src/cmd')
-rw-r--r--src/cmd/ca.cpp2
-rw-r--r--src/cmd/dsa_sign.cpp2
-rw-r--r--src/cmd/dsa_ver.cpp2
-rw-r--r--src/cmd/keygen.cpp2
4 files changed, 4 insertions, 4 deletions
diff --git a/src/cmd/ca.cpp b/src/cmd/ca.cpp
index fd1873cc3..b32f07f51 100644
--- a/src/cmd/ca.cpp
+++ b/src/cmd/ca.cpp
@@ -33,7 +33,7 @@ int ca(int argc, char* argv[])
X509_Certificate ca_cert(arg_ca_cert);
- std::auto_ptr<PKCS8_PrivateKey> privkey(
+ std::unique_ptr<PKCS8_PrivateKey> privkey(
PKCS8::load_key(arg_ca_key, rng, arg_passphrase)
);
diff --git a/src/cmd/dsa_sign.cpp b/src/cmd/dsa_sign.cpp
index c052b8a73..baf884301 100644
--- a/src/cmd/dsa_sign.cpp
+++ b/src/cmd/dsa_sign.cpp
@@ -49,7 +49,7 @@ int dsa_sign(int argc, char* argv[])
AutoSeeded_RNG rng;
- std::auto_ptr<PKCS8_PrivateKey> key(
+ std::unique_ptr<PKCS8_PrivateKey> key(
PKCS8::load_key(argv[1], rng, passphrase)
);
diff --git a/src/cmd/dsa_ver.cpp b/src/cmd/dsa_ver.cpp
index 1d058df14..0490bb065 100644
--- a/src/cmd/dsa_ver.cpp
+++ b/src/cmd/dsa_ver.cpp
@@ -45,7 +45,7 @@ int dsa_verify(int argc, char* argv[])
std::string sigstr;
getline(sigfile, sigstr);
- std::auto_ptr<X509_PublicKey> key(X509::load_key(argv[1]));
+ std::unique_ptr<X509_PublicKey> key(X509::load_key(argv[1]));
DSA_PublicKey* dsakey = dynamic_cast<DSA_PublicKey*>(key.get());
if(!dsakey)
diff --git a/src/cmd/keygen.cpp b/src/cmd/keygen.cpp
index 9a9d17322..99769a62f 100644
--- a/src/cmd/keygen.cpp
+++ b/src/cmd/keygen.cpp
@@ -97,7 +97,7 @@ int keygen(int argc, char* argv[])
AutoSeeded_RNG rng;
- std::auto_ptr<Private_Key> key(gen_key(rng, algo, bits));
+ std::unique_ptr<Private_Key> key(gen_key(rng, algo, bits));
pub << X509::PEM_encode(*key);