aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/cert/x509/x509_ca.h
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2016-09-04 10:04:02 -0400
committerJack Lloyd <[email protected]>2016-10-07 19:27:56 -0400
commit25b6fb53eec30620d084411fb1dbc8913142fc6d (patch)
tree6ffa291a3f4a74cac23bce304a42f4c26e33bcda /src/lib/cert/x509/x509_ca.h
parent62cd6e3651711f759f870460599596ff5be904a5 (diff)
Remove Algo_Registry usage from public key code.
Instead the key types exposes operations like `create_encryption_op` which will return the relevant operation if the algorithm supports it. Changes pubkey.h interface, now RNG is passed at init time. Blinder previous created its own RNG, now it takes it from app.
Diffstat (limited to 'src/lib/cert/x509/x509_ca.h')
-rw-r--r--src/lib/cert/x509/x509_ca.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/lib/cert/x509/x509_ca.h b/src/lib/cert/x509/x509_ca.h
index ba3724f5e..218ee0803 100644
--- a/src/lib/cert/x509/x509_ca.h
+++ b/src/lib/cert/x509/x509_ca.h
@@ -14,6 +14,10 @@
#include <botan/pkcs10.h>
#include <botan/pubkey.h>
+#if defined(BOTAN_HAS_SYSTEM_RNG)
+ #include <botan/system_rng.h>
+#endif
+
namespace Botan {
/**
@@ -95,7 +99,17 @@ class BOTAN_DLL X509_CA
*/
X509_CA(const X509_Certificate& ca_certificate,
const Private_Key& key,
- const std::string& hash_fn);
+ const std::string& hash_fn,
+ RandomNumberGenerator& rng);
+
+#if defined(BOTAN_HAS_SYSTEM_RNG)
+ BOTAN_DEPRECATED("Use version taking RNG object")
+ X509_CA(const X509_Certificate& ca_certificate,
+ const Private_Key& key,
+ const std::string& hash_fn) :
+ X509_CA(ca_certificate, key, hash_fn, system_rng())
+ {}
+#endif
X509_CA(const X509_CA&) = delete;
X509_CA& operator=(const X509_CA&) = delete;
@@ -120,6 +134,7 @@ class BOTAN_DLL X509_CA
* @return A PK_Signer object for generating signatures
*/
BOTAN_DLL PK_Signer* choose_sig_format(const Private_Key& key,
+ RandomNumberGenerator& rng,
const std::string& hash_fn,
AlgorithmIdentifier& alg_id);