From d70e8347738df1e1e061514cc42413006a1ab9a1 Mon Sep 17 00:00:00 2001 From: Daniel Neus Date: Tue, 28 Jun 2016 18:03:39 +0200 Subject: use NULL_RNG to make clear that the RNG is not used --- src/lib/prov/pkcs11/p11_ecdh.cpp | 14 ++------------ src/lib/prov/pkcs11/p11_ecdsa.cpp | 14 ++------------ 2 files changed, 4 insertions(+), 24 deletions(-) diff --git a/src/lib/prov/pkcs11/p11_ecdh.cpp b/src/lib/prov/pkcs11/p11_ecdh.cpp index 82c1716af..de24d6da4 100644 --- a/src/lib/prov/pkcs11/p11_ecdh.cpp +++ b/src/lib/prov/pkcs11/p11_ecdh.cpp @@ -15,12 +15,7 @@ #include #include #include - -#if defined(BOTAN_HAS_SYSTEM_RNG) - #include -#else - #include -#endif +#include namespace Botan { @@ -33,14 +28,9 @@ ECDH_PublicKey PKCS11_ECDH_PublicKey::export_key() const ECDH_PrivateKey PKCS11_ECDH_PrivateKey::export_key() const { - -#if defined(BOTAN_HAS_SYSTEM_RNG) - System_RNG rng; -#else - AutoSeeded_RNG rng; -#endif auto priv_key = get_attribute_value(AttributeType::Value); + Null_RNG rng; return ECDH_PrivateKey(rng, domain(), BigInt::decode(priv_key)); } diff --git a/src/lib/prov/pkcs11/p11_ecdsa.cpp b/src/lib/prov/pkcs11/p11_ecdsa.cpp index 4aeacda72..078bc429d 100644 --- a/src/lib/prov/pkcs11/p11_ecdsa.cpp +++ b/src/lib/prov/pkcs11/p11_ecdsa.cpp @@ -14,12 +14,7 @@ #include #include #include - -#if defined(BOTAN_HAS_SYSTEM_RNG) - #include -#else - #include -#endif +#include namespace Botan { namespace PKCS11 { @@ -47,14 +42,9 @@ bool PKCS11_ECDSA_PrivateKey::check_key(RandomNumberGenerator& rng, bool strong) ECDSA_PrivateKey PKCS11_ECDSA_PrivateKey::export_key() const { - -#if defined(BOTAN_HAS_SYSTEM_RNG) - System_RNG rng; -#else - AutoSeeded_RNG rng; -#endif auto priv_key = get_attribute_value(AttributeType::Value); + Null_RNG rng; return ECDSA_PrivateKey(rng, domain(), BigInt::decode(priv_key)); } -- cgit v1.2.3