aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlloyd <[email protected]>2008-04-10 05:31:08 +0000
committerlloyd <[email protected]>2008-04-10 05:31:08 +0000
commita5cbd8f304d646352789686a659c6923e320f22d (patch)
tree62bd8bcab0e294e0a0b51fb2180b721eb37f71a8
parentf9bdb307da05d9c60fb1614acc2b8ff7c3b7a0e7 (diff)
Remove the config option rng/ms_capi_prov_type - the CryptoAPI entropy
source will default to using the PROV_RSA_FULL provider if an empty string is passed to the constructor.
-rw-r--r--modules/es_capi/es_capi.cpp11
-rw-r--r--src/policy.cpp1
2 files changed, 3 insertions, 9 deletions
diff --git a/modules/es_capi/es_capi.cpp b/modules/es_capi/es_capi.cpp
index 725474bd3..1bc6b7011 100644
--- a/modules/es_capi/es_capi.cpp
+++ b/modules/es_capi/es_capi.cpp
@@ -54,7 +54,7 @@ u32bit Win32_CAPI_EntropySource::slow_poll(byte output[], u32bit length)
if(length > 64)
length = 64;
- for(u32bit j = 0; j != prov_types.size(); j++)
+ for(u32bit j = 0; j != prov_types.size(); ++j)
{
CSP_Handle csp(prov_types[j]);
if(!csp.is_valid())
@@ -71,14 +71,9 @@ u32bit Win32_CAPI_EntropySource::slow_poll(byte output[], u32bit length)
*************************************************/
Win32_CAPI_EntropySource::Win32_CAPI_EntropySource(const std::string& provs)
{
- std::vector<std::string> capi_provs;
+ std::vector<std::string> capi_provs = split_on(provs, ':');
- if(provs == "")
- capi_provs = global_config().option_as_list("rng/ms_capi_prov_type");
- else
- capi_provs = split_on(provs, ':');
-
- for(u32bit j = 0; j != capi_provs.size(); j++)
+ for(u32bit j = 0; j != capi_provs.size(); ++j)
{
if(capi_provs[j] == "RSA_FULL") prov_types.push_back(PROV_RSA_FULL);
if(capi_provs[j] == "INTEL_SEC") prov_types.push_back(PROV_INTEL_SEC);
diff --git a/src/policy.cpp b/src/policy.cpp
index 9adb8e6b5..3c8081fd8 100644
--- a/src/policy.cpp
+++ b/src/policy.cpp
@@ -223,7 +223,6 @@ void set_default_config(Config& config)
config.set_option("pk/test/private", "basic");
config.set_option("pk/test/private_gen", "all");
- config.set_option("rng/ms_capi_prov_type", "INTEL_SEC:RSA_FULL");
config.set_option("rng/unix_path", "/bin:/sbin:/usr/bin:/usr/sbin");
config.set_option("rng/es_files", "/dev/random:/dev/srandom:/dev/urandom");
config.set_option("rng/egd_path",