diff options
author | Daniel Neus <[email protected]> | 2016-06-28 18:03:39 +0200 |
---|---|---|
committer | Daniel Neus <[email protected]> | 2016-06-28 18:03:39 +0200 |
commit | d70e8347738df1e1e061514cc42413006a1ab9a1 (patch) | |
tree | 8b5578573adf2570de76588dcc30ddc2c7ca92c2 | |
parent | cc9e06a433e2d0d4995ffd5e75e701954dc994fd (diff) |
use NULL_RNG to make clear that the RNG is not used
-rw-r--r-- | src/lib/prov/pkcs11/p11_ecdh.cpp | 14 | ||||
-rw-r--r-- | 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 <botan/der_enc.h> #include <botan/internal/algo_registry.h> #include <botan/internal/pk_utils.h> - -#if defined(BOTAN_HAS_SYSTEM_RNG) - #include <botan/system_rng.h> -#else - #include <botan/auto_rng.h> -#endif +#include <botan/rng.h> 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 <botan/internal/algo_registry.h> #include <botan/internal/pk_utils.h> #include <botan/keypair.h> - -#if defined(BOTAN_HAS_SYSTEM_RNG) - #include <botan/system_rng.h> -#else - #include <botan/auto_rng.h> -#endif +#include <botan/rng.h> 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)); } |