aboutsummaryrefslogtreecommitdiffstats
path: root/checks/pk.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2012-05-18 20:44:34 +0000
committerlloyd <[email protected]>2012-05-18 20:44:34 +0000
commit8383b0b503c812e45f2780217b048a19a8946853 (patch)
tree939403bad80ee2b1e13b69c82adc316422a9c7d6 /checks/pk.cpp
parentc691561f3198f481c13457433efbccc1c9fcd898 (diff)
Replace 0 and NULL pointer constants with nullptr. Also fix an old
style cast in secmem.h
Diffstat (limited to 'checks/pk.cpp')
-rw-r--r--checks/pk.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/checks/pk.cpp b/checks/pk.cpp
index 261c5f78c..5ef5df94b 100644
--- a/checks/pk.cpp
+++ b/checks/pk.cpp
@@ -108,7 +108,7 @@ void validate_save_and_load(const Private_Key* priv_key,
DataSource_Memory input_pub(pub_pem);
std::auto_ptr<Public_Key> restored_pub(X509::load_key(input_pub));
- if(restored_pub.get() == 0)
+ if(!restored_pub.get())
std::cout << "Could not recover " << name << " public key\n";
else if(restored_pub->check_key(rng, true) == false)
std::cout << "Restored pubkey failed self tests " << name << "\n";
@@ -128,7 +128,7 @@ void validate_save_and_load(const Private_Key* priv_key,
std::auto_ptr<Private_Key> restored_priv(
PKCS8::load_key(input_priv, rng));
- if(restored_priv.get() == 0)
+ if(!restored_priv.get())
std::cout << "Could not recover " << name << " privlic key\n";
else if(restored_priv->check_key(rng, true) == false)
std::cout << "Restored privkey failed self tests " << name << "\n";