aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstate
diff options
context:
space:
mode:
authorlloyd <[email protected]>2012-05-25 22:52:00 +0000
committerlloyd <[email protected]>2012-05-25 22:52:00 +0000
commit12090a7148d9ee73572cc1a7268fc489504a8173 (patch)
tree51e50ce0852c56231e9e6dc13f168b10edd45d01 /src/libstate
parent9594979caf775dc4062850044715b804d1fda60c (diff)
parent65cc04445f8d40497f02a14bd8cb97081790e54b (diff)
propagate from branch 'net.randombit.botan.x509-path-validation' (head 63b5a20eab129ca13287fda33d2d02eec329708f)
to branch 'net.randombit.botan' (head 8b8150f09c55184f028f2929c4e7f7cd0d46d96e)
Diffstat (limited to 'src/libstate')
-rw-r--r--src/libstate/get_enc.cpp24
-rw-r--r--src/libstate/global_rng.cpp31
-rw-r--r--src/libstate/global_state.cpp6
-rw-r--r--src/libstate/info.txt3
-rw-r--r--src/libstate/init.cpp39
-rw-r--r--src/libstate/libstate.cpp148
-rw-r--r--src/libstate/libstate.h56
-rw-r--r--src/libstate/lookup.h8
-rw-r--r--src/libstate/policy.cpp84
9 files changed, 163 insertions, 236 deletions
diff --git a/src/libstate/get_enc.cpp b/src/libstate/get_enc.cpp
index 6a87268e8..00297464b 100644
--- a/src/libstate/get_enc.cpp
+++ b/src/libstate/get_enc.cpp
@@ -96,7 +96,11 @@ EMSA* get_emsa(const std::string& algo_spec)
#if defined(BOTAN_HAS_EMSA1)
if(request.algo_name() == "EMSA1" && request.arg_count() == 1)
+ {
+ if(request.arg(0) == "Raw")
+ return new EMSA_Raw;
return new EMSA1(af.make_hash_function(request.arg(0)));
+ }
#endif
#if defined(BOTAN_HAS_EMSA1_BSI)
@@ -147,7 +151,7 @@ EME* get_eme(const std::string& algo_spec)
Algorithm_Factory& af = global_state().algorithm_factory();
if(request.algo_name() == "Raw")
- return 0; // No padding
+ return nullptr; // No padding
#if defined(BOTAN_HAS_EME_PKCS1v15)
if(request.algo_name() == "PKCS1v15" && request.arg_count() == 0)
@@ -178,7 +182,7 @@ KDF* get_kdf(const std::string& algo_spec)
Algorithm_Factory& af = global_state().algorithm_factory();
if(request.algo_name() == "Raw")
- return 0; // No KDF
+ return nullptr; // No KDF
#if defined(BOTAN_HAS_KDF1)
if(request.algo_name() == "KDF1" && request.arg_count() == 1)
@@ -195,14 +199,24 @@ KDF* get_kdf(const std::string& algo_spec)
return new X942_PRF(request.arg(0)); // OID
#endif
+#if defined(BOTAN_HAS_SSL_V3_PRF)
+ if(request.algo_name() == "SSL3-PRF" && request.arg_count() == 0)
+ return new SSL3_PRF;
+#endif
+
#if defined(BOTAN_HAS_TLS_V10_PRF)
if(request.algo_name() == "TLS-PRF" && request.arg_count() == 0)
return new TLS_PRF;
#endif
-#if defined(BOTAN_HAS_SSL_V3_PRF)
- if(request.algo_name() == "SSL3-PRF" && request.arg_count() == 0)
- return new SSL3_PRF;
+#if defined(BOTAN_HAS_TLS_V10_PRF)
+ if(request.algo_name() == "TLS-PRF" && request.arg_count() == 0)
+ return new TLS_PRF;
+#endif
+
+#if defined(BOTAN_HAS_TLS_V12_PRF)
+ if(request.algo_name() == "TLS-12-PRF" && request.arg_count() == 1)
+ return new TLS_12_PRF(af.make_mac("HMAC(" + request.arg(0) + ")"));
#endif
throw Algorithm_Not_Found(algo_spec);
diff --git a/src/libstate/global_rng.cpp b/src/libstate/global_rng.cpp
index e9ea530ac..65da38f5f 100644
--- a/src/libstate/global_rng.cpp
+++ b/src/libstate/global_rng.cpp
@@ -6,7 +6,6 @@
*/
#include <botan/libstate.h>
-#include <botan/internal/mutex.h>
#if defined(BOTAN_HAS_RANDPOOL)
#include <botan/randpool.h>
@@ -24,6 +23,10 @@
#include <botan/internal/hres_timer.h>
#endif
+#if defined(BOTAN_HAS_ENTROPY_SRC_RDRAND)
+ #include <botan/internal/rdrand.h>
+#endif
+
#if defined(BOTAN_HAS_ENTROPY_SRC_DEV_RANDOM)
#include <botan/internal/dev_random.h>
#endif
@@ -65,6 +68,10 @@ void add_entropy_sources(RandomNumberGenerator* rng)
rng->add_entropy_source(new High_Resolution_Timestamp);
#endif
+#if defined(BOTAN_HAS_ENTROPY_SRC_RDRAND)
+ rng->add_entropy_source(new Intel_Rdrand);
+#endif
+
#if defined(BOTAN_HAS_ENTROPY_SRC_DEV_RANDOM)
rng->add_entropy_source(
new Device_EntropySource(
@@ -107,62 +114,62 @@ class Serialized_PRNG : public RandomNumberGenerator
public:
void randomize(byte out[], size_t len)
{
- Mutex_Holder lock(mutex);
+ std::lock_guard<std::mutex> lock(mutex);
rng->randomize(out, len);
}
bool is_seeded() const
{
- Mutex_Holder lock(mutex);
+ std::lock_guard<std::mutex> lock(mutex);
return rng->is_seeded();
}
void clear()
{
- Mutex_Holder lock(mutex);
+ std::lock_guard<std::mutex> lock(mutex);
rng->clear();
}
std::string name() const
{
- Mutex_Holder lock(mutex);
+ std::lock_guard<std::mutex> lock(mutex);
return rng->name();
}
void reseed(size_t poll_bits)
{
- Mutex_Holder lock(mutex);
+ std::lock_guard<std::mutex> lock(mutex);
rng->reseed(poll_bits);
}
void add_entropy_source(EntropySource* es)
{
- Mutex_Holder lock(mutex);
+ std::lock_guard<std::mutex> lock(mutex);
rng->add_entropy_source(es);
}
void add_entropy(const byte in[], size_t len)
{
- Mutex_Holder lock(mutex);
+ std::lock_guard<std::mutex> lock(mutex);
rng->add_entropy(in, len);
}
// We do not own the mutex; Library_State does
- Serialized_PRNG(RandomNumberGenerator* r, Mutex* m) :
+ Serialized_PRNG(RandomNumberGenerator* r, std::mutex& m) :
mutex(m), rng(r) {}
~Serialized_PRNG() { delete rng; }
private:
- Mutex* mutex;
+ std::mutex& mutex;
RandomNumberGenerator* rng;
};
}
RandomNumberGenerator* Library_State::make_global_rng(Algorithm_Factory& af,
- Mutex* mutex)
+ std::mutex& mutex)
{
- RandomNumberGenerator* rng = 0;
+ RandomNumberGenerator* rng = nullptr;
#if defined(BOTAN_HAS_HMAC_RNG)
diff --git a/src/libstate/global_state.cpp b/src/libstate/global_state.cpp
index 43c935ca3..6a846d9b0 100644
--- a/src/libstate/global_state.cpp
+++ b/src/libstate/global_state.cpp
@@ -22,7 +22,7 @@ namespace Global_State_Management {
*/
namespace {
-Library_State* global_lib_state = 0;
+Library_State* global_lib_state = nullptr;
}
@@ -37,7 +37,7 @@ Library_State& global_state()
if(!global_lib_state)
{
global_lib_state = new Library_State;
- global_lib_state->initialize(true);
+ global_lib_state->initialize();
}
return (*global_lib_state);
@@ -83,7 +83,7 @@ Library_State* swap_global_state(Library_State* new_state)
*/
bool global_state_exists()
{
- return (global_lib_state != 0);
+ return (global_lib_state != nullptr);
}
}
diff --git a/src/libstate/info.txt b/src/libstate/info.txt
index d48ad70d5..0e523e601 100644
--- a/src/libstate/info.txt
+++ b/src/libstate/info.txt
@@ -38,8 +38,6 @@ hmac_rng
kdf
mac
mode_pad
-mutex
-noop_mutex
pbkdf
pk_pad
pubkey
@@ -47,5 +45,4 @@ rng
sha2_32
sha2_64
stream
-system_alloc
</requires>
diff --git a/src/libstate/init.cpp b/src/libstate/init.cpp
index 7cdc615bd..2d724f366 100644
--- a/src/libstate/init.cpp
+++ b/src/libstate/init.cpp
@@ -1,12 +1,11 @@
/*
* Default Initialization Function
-* (C) 1999-2007 Jack Lloyd
+* (C) 1999-2009 Jack Lloyd
*
* Distributed under the terms of the Botan license
*/
#include <botan/init.h>
-#include <botan/parsing.h>
#include <botan/libstate.h>
#include <botan/global_state.h>
@@ -15,48 +14,20 @@ namespace Botan {
/*
* Library Initialization
*/
-void LibraryInitializer::initialize(const std::string& arg_string)
+void LibraryInitializer::initialize(const std::string&)
{
- bool thread_safe = false;
-
- const std::vector<std::string> arg_list = split_on(arg_string, ' ');
- for(size_t i = 0; i != arg_list.size(); ++i)
- {
- if(arg_list[i].size() == 0)
- continue;
-
- std::string name, value;
-
- if(arg_list[i].find('=') == std::string::npos)
- {
- name = arg_list[i];
- value = "true";
- }
- else
- {
- std::vector<std::string> name_and_value = split_on(arg_list[i], '=');
- name = name_and_value[0];
- value = name_and_value[1];
- }
-
- bool is_on =
- (value == "1" || value == "true" || value == "yes" || value == "on");
-
- if(name == "thread_safe")
- thread_safe = is_on;
- }
try
{
/*
This two stage initialization process is because Library_State's
constructor will implicitly refer to global state through the
- allocators and so for, so global_state() has to be a valid
+ allocators and so forth, so global_state() has to be a valid
reference before initialize() can be called. Yeah, gross.
*/
Global_State_Management::set_global_state(new Library_State);
- global_state().initialize(thread_safe);
+ global_state().initialize();
}
catch(...)
{
@@ -70,7 +41,7 @@ void LibraryInitializer::initialize(const std::string& arg_string)
*/
void LibraryInitializer::deinitialize()
{
- Global_State_Management::set_global_state(0);
+ Global_State_Management::set_global_state(nullptr);
}
}
diff --git a/src/libstate/libstate.cpp b/src/libstate/libstate.cpp
index 076b55fcf..78ff9135c 100644
--- a/src/libstate/libstate.cpp
+++ b/src/libstate/libstate.cpp
@@ -9,30 +9,14 @@
#include <botan/charset.h>
#include <botan/engine.h>
#include <botan/cpuid.h>
-#include <botan/internal/defalloc.h>
#include <botan/internal/core_engine.h>
-#include <botan/internal/mutex.h>
-#include <botan/internal/mux_noop.h>
#include <botan/internal/stl_util.h>
-#include <botan/internal/mlock.h>
#include <algorithm>
#if defined(BOTAN_HAS_SELFTESTS)
#include <botan/selftest.h>
#endif
-#if defined(BOTAN_HAS_MUTEX_PTHREAD)
- #include <botan/internal/mux_pthr.h>
-#elif defined(BOTAN_HAS_MUTEX_WIN32)
- #include <botan/internal/mux_win32.h>
-#elif defined(BOTAN_HAS_MUTEX_QT)
- #include <botan/internal/mux_qt.h>
-#endif
-
-#if defined(BOTAN_HAS_ALLOC_MMAP)
- #include <botan/internal/mmap_mem.h>
-#endif
-
#if defined(BOTAN_HAS_ENGINE_ASSEMBLER)
#include <botan/internal/asm_engine.h>
#endif
@@ -56,67 +40,12 @@
namespace Botan {
/*
-* Get a new mutex object
-*/
-Mutex* Library_State::get_mutex() const
- {
- return mutex_factory->make();
- }
-
-/*
-* Get an allocator by its name
-*/
-Allocator* Library_State::get_allocator(const std::string& type) const
- {
- Mutex_Holder lock(allocator_lock);
-
- if(type != "")
- return search_map<std::string, Allocator*>(alloc_factory, type, 0);
-
- if(!cached_default_allocator)
- {
- cached_default_allocator =
- search_map<std::string, Allocator*>(alloc_factory,
- default_allocator_name, 0);
- }
-
- return cached_default_allocator;
- }
-
-/*
-* Create a new name to object mapping
-*/
-void Library_State::add_allocator(Allocator* allocator)
- {
- Mutex_Holder lock(allocator_lock);
-
- allocator->init();
-
- allocators.push_back(allocator);
- alloc_factory[allocator->type()] = allocator;
- }
-
-/*
-* Set the default allocator type
-*/
-void Library_State::set_default_allocator(const std::string& type)
- {
- Mutex_Holder lock(allocator_lock);
-
- if(type == "")
- return;
-
- default_allocator_name = type;
- cached_default_allocator = 0;
- }
-
-/*
* Get a configuration value
*/
std::string Library_State::get(const std::string& section,
- const std::string& key) const
+ const std::string& key)
{
- Mutex_Holder lock(config_lock);
+ std::lock_guard<std::mutex> lock(config_lock);
return search_map<std::string, std::string>(config,
section + "/" + key, "");
@@ -126,9 +55,9 @@ std::string Library_State::get(const std::string& section,
* See if a particular option has been set
*/
bool Library_State::is_set(const std::string& section,
- const std::string& key) const
+ const std::string& key)
{
- Mutex_Holder lock(config_lock);
+ std::lock_guard<std::mutex> lock(config_lock);
return config.count(section + "/" + key) != 0;
}
@@ -139,12 +68,11 @@ bool Library_State::is_set(const std::string& section,
void Library_State::set(const std::string& section, const std::string& key,
const std::string& value, bool overwrite)
{
- Mutex_Holder lock(config_lock);
+ std::lock_guard<std::mutex> lock(config_lock);
std::string full_key = section + "/" + key;
- std::map<std::string, std::string>::const_iterator i =
- config.find(full_key);
+ auto i = config.find(full_key);
if(overwrite || i == config.end() || i->second == "")
config[full_key] = value;
@@ -161,7 +89,7 @@ void Library_State::add_alias(const std::string& key, const std::string& value)
/*
* Dereference an alias to a fixed name
*/
-std::string Library_State::deref_alias(const std::string& key) const
+std::string Library_State::deref_alias(const std::string& key)
{
std::string result = key;
while(is_set("alias", result))
@@ -184,7 +112,7 @@ Algorithm_Factory& Library_State::algorithm_factory() const
*/
RandomNumberGenerator& Library_State::global_rng()
{
- Mutex_Holder lock(global_rng_lock);
+ std::lock_guard<std::mutex> lock(global_rng_lock);
if(!global_rng_ptr)
global_rng_ptr = make_global_rng(algorithm_factory(),
@@ -196,46 +124,16 @@ RandomNumberGenerator& Library_State::global_rng()
/*
* Load a set of modules
*/
-void Library_State::initialize(bool thread_safe)
+void Library_State::initialize()
{
CPUID::initialize();
- if(mutex_factory)
+ if(m_algorithm_factory)
throw Invalid_State("Library_State has already been initialized");
- if(!thread_safe)
- {
- mutex_factory = new Noop_Mutex_Factory;
- }
- else
- {
-#if defined(BOTAN_HAS_MUTEX_PTHREAD)
- mutex_factory = new Pthread_Mutex_Factory;
-#elif defined(BOTAN_HAS_MUTEX_WIN32)
- mutex_factory = new Win32_Mutex_Factory;
-#elif defined(BOTAN_HAS_MUTEX_QT)
- mutex_factory Qt_Mutex_Factory;
-#else
- throw Invalid_State("Could not find a thread-safe mutex object to use");
-#endif
- }
-
- allocator_lock = get_mutex();
- config_lock = get_mutex();
- global_rng_lock = get_mutex();
-
- default_allocator_name = has_mlock() ? "locking" : "malloc";
-
- add_allocator(new Malloc_Allocator);
- add_allocator(new Locking_Allocator(get_mutex()));
-
-#if defined(BOTAN_HAS_ALLOC_MMAP)
- add_allocator(new MemoryMapping_Allocator(get_mutex()));
-#endif
-
load_default_config();
- m_algorithm_factory = new Algorithm_Factory(*mutex_factory);
+ m_algorithm_factory = new Algorithm_Factory();
#if defined(BOTAN_HAS_ENGINE_GNU_MP)
algorithm_factory().add_engine(new GMP_Engine);
@@ -269,13 +167,9 @@ void Library_State::initialize(bool thread_safe)
*/
Library_State::Library_State()
{
- mutex_factory = 0;
- allocator_lock = config_lock = 0;
- cached_default_allocator = 0;
- m_algorithm_factory = 0;
+ m_algorithm_factory = nullptr;
- global_rng_lock = 0;
- global_rng_ptr = 0;
+ global_rng_ptr = nullptr;
}
/*
@@ -284,20 +178,10 @@ Library_State::Library_State()
Library_State::~Library_State()
{
delete m_algorithm_factory;
- delete global_rng_ptr;
-
- cached_default_allocator = 0;
+ m_algorithm_factory = nullptr;
- for(size_t i = 0; i != allocators.size(); ++i)
- {
- allocators[i]->destroy();
- delete allocators[i];
- }
-
- delete global_rng_lock;
- delete allocator_lock;
- delete mutex_factory;
- delete config_lock;
+ delete global_rng_ptr;
+ global_rng_ptr = nullptr;
}
}
diff --git a/src/libstate/libstate.h b/src/libstate/libstate.h
index aa957c8c9..b260a5bb9 100644
--- a/src/libstate/libstate.h
+++ b/src/libstate/libstate.h
@@ -9,20 +9,18 @@
#define BOTAN_LIB_STATE_H__
#include <botan/global_state.h>
-#include <botan/allocate.h>
#include <botan/algo_factory.h>
#include <botan/rng.h>
+#include <mutex>
#include <string>
#include <vector>
#include <map>
namespace Botan {
-class Mutex;
-
-/**
-* Global state container aka the buritto at the center of it all
+/*
+* Global State Container Base
*/
class BOTAN_DLL Library_State
{
@@ -30,10 +28,10 @@ class BOTAN_DLL Library_State
Library_State();
~Library_State();
- /**
- * @param thread_safe should a mutex be used for serialization
- */
- void initialize(bool thread_safe);
+ Library_State(const Library_State&) = delete;
+ Library_State& operator=(const Library_State&) = delete;
+
+ void initialize();
/**
* @return global Algorithm_Factory
@@ -46,18 +44,6 @@ class BOTAN_DLL Library_State
RandomNumberGenerator& global_rng();
/**
- * @param name the name of the allocator
- * @return allocator matching this name, or NULL
- */
- Allocator* get_allocator(const std::string& name = "") const;
-
- /**
- * Add a new allocator to the list of available ones
- * @param alloc the allocator to add
- */
- void add_allocator(Allocator* alloc);
-
- /**
* Set the default allocator
* @param name the name of the allocator to use as the default
*/
@@ -70,7 +56,7 @@ class BOTAN_DLL Library_State
* @result the value of the parameter
*/
std::string get(const std::string& section,
- const std::string& key) const;
+ const std::string& key);
/**
* Check whether a certain parameter is set or not.
@@ -80,7 +66,7 @@ class BOTAN_DLL Library_State
* false otherwise
*/
bool is_set(const std::string& section,
- const std::string& key) const;
+ const std::string& key);
/**
* Set a configuration parameter.
@@ -109,35 +95,19 @@ class BOTAN_DLL Library_State
* @param alias the alias to resolve.
* @return what the alias stands for
*/
- std::string deref_alias(const std::string& alias) const;
-
- /**
- * @return newly created Mutex (free with delete)
- */
- Mutex* get_mutex() const;
+ std::string deref_alias(const std::string&);
private:
static RandomNumberGenerator* make_global_rng(Algorithm_Factory& af,
- Mutex* mutex);
+ std::mutex& mutex);
void load_default_config();
- Library_State(const Library_State&) {}
- Library_State& operator=(const Library_State&) { return (*this); }
-
- class Mutex_Factory* mutex_factory;
-
- Mutex* global_rng_lock;
+ std::mutex global_rng_lock;
RandomNumberGenerator* global_rng_ptr;
- Mutex* config_lock;
+ std::mutex config_lock;
std::map<std::string, std::string> config;
- Mutex* allocator_lock;
- std::string default_allocator_name;
- std::map<std::string, Allocator*> alloc_factory;
- mutable Allocator* cached_default_allocator;
- std::vector<Allocator*> allocators;
-
Algorithm_Factory* m_algorithm_factory;
};
diff --git a/src/libstate/lookup.h b/src/libstate/lookup.h
index e10c195b8..96364e1d9 100644
--- a/src/libstate/lookup.h
+++ b/src/libstate/lookup.h
@@ -235,7 +235,7 @@ BOTAN_DLL bool have_algorithm(const std::string& algo_spec);
inline bool have_block_cipher(const std::string& algo_spec)
{
Algorithm_Factory& af = global_state().algorithm_factory();
- return (af.prototype_block_cipher(algo_spec) != 0);
+ return (af.prototype_block_cipher(algo_spec) != nullptr);
}
/**
@@ -248,7 +248,7 @@ inline bool have_block_cipher(const std::string& algo_spec)
inline bool have_stream_cipher(const std::string& algo_spec)
{
Algorithm_Factory& af = global_state().algorithm_factory();
- return (af.prototype_stream_cipher(algo_spec) != 0);
+ return (af.prototype_stream_cipher(algo_spec) != nullptr);
}
/**
@@ -261,7 +261,7 @@ inline bool have_stream_cipher(const std::string& algo_spec)
inline bool have_hash(const std::string& algo_spec)
{
Algorithm_Factory& af = global_state().algorithm_factory();
- return (af.prototype_hash_function(algo_spec) != 0);
+ return (af.prototype_hash_function(algo_spec) != nullptr);
}
/**
@@ -274,7 +274,7 @@ inline bool have_hash(const std::string& algo_spec)
inline bool have_mac(const std::string& algo_spec)
{
Algorithm_Factory& af = global_state().algorithm_factory();
- return (af.prototype_mac(algo_spec) != 0);
+ return (af.prototype_mac(algo_spec) != nullptr);
}
/*
diff --git a/src/libstate/policy.cpp b/src/libstate/policy.cpp
index 7abea7d4d..b1da22ce8 100644
--- a/src/libstate/policy.cpp
+++ b/src/libstate/policy.cpp
@@ -337,6 +337,15 @@ void set_default_dl_groups(Library_State& config)
"NgRlEbmT//////////8="
"-----END X942 DH PARAMETERS-----");
+ config.set("dl", "modp/srp/1536",
+ "-----BEGIN DH PARAMETERS-----"
+ "MIHHAoHBAJ3vPK+5OSd6sfEqhheke7vbpR30maxMgL7uqWFLGcxNX09fVW4ny95R"
+ "xqlL5GB6KRVYkDug0PhDgLZVu5oi6NzfAop87Gfw0IE0sci5eYkUm2CeC+O6tj1H"
+ "VIOB28Wx/HZOP0tT3Z2hFYv9PiucjPVu3wGVOTSWJ9sv1T0kt8SGZXcuQ31sf4zk"
+ "QnNK98y3roN8Jkrjqb64f4ov6bi1KS5aAh//XpFHnoznoowkQsbzFRgPk0maI03P"
+ "duP+0TX5uwIBAg=="
+ "-----END DH PARAMETERS-----");
+
config.set("dl", "modp/ietf/2048",
"-----BEGIN X942 DH PARAMETERS-----"
"MIICDAKCAQEA///////////JD9qiIWjCNMTGYouA3BzRKQJOCIpnzHQCC76mOxOb"
@@ -388,6 +397,19 @@ void set_default_dl_groups(Library_State& config)
"JcFokFSdaWV//////////w=="
"-----END X942 DH PARAMETERS-----");
+ config.set("dl", "modp/srp/3072",
+ "-----BEGIN DH PARAMETERS-----"
+ "MIIBiAKCAYEA///////////JD9qiIWjCNMTGYouA3BzRKQJOCIpnzHQCC76mOxOb"
+ "IlFKCHmONATd75UZs806QxswKwpt8l8UN0/hNW1tUcJF5IW1dmJefsb0TELppjft"
+ "awv/XLb0Brft7jhr+1qJn6WunyQRfEsf5kkoZlHs5Fs9wgB8uKFjvwWY2kg2HFXT"
+ "mmkWP6j9JM9fg2VdI9yjrZYcYvNWIIVSu57VKQdwlpZtZww1Tkq8mATxdGwIyhgh"
+ "fDKQXkYuNs474553LBgOhgObJ4Oi7Aeij7XFXfBvTFLJ3ivL9pVYFxg5lUl86pVq"
+ "5RXSJhiY+gUQFXKOWoqqxC2tMxcNBFB6M6hVIavfHLpk7PuFBFjb7wqK6nFXXQYM"
+ "fbOXD4Wm4eTHq/WujNsJM9cejJTgSiVhnc7j0iYa0u5r8S/6BtmKCGTYdgJzPshq"
+ "ZFIfKxgXeyAMu+EXV3phXWx3CYjAutlG4gjiT6B05asxQ9tb/OD9EI5LgtEgqTrS"
+ "yv//////////AgEF"
+ "-----END DH PARAMETERS-----");
+
config.set("dl", "modp/ietf/4096",
"-----BEGIN X942 DH PARAMETERS-----"
"MIIEDAKCAgEA///////////JD9qiIWjCNMTGYouA3BzRKQJOCIpnzHQCC76mOxOb"
@@ -414,6 +436,21 @@ void set_default_dl_groups(Library_State& config)
"ydp1TEbH7uDDf9vuSFNgR6b6GuSaAxjM//////////8="
"-----END X942 DH PARAMETERS-----");
+ config.set("dl", "modp/srp/4096",
+ "-----BEGIN DH PARAMETERS-----"
+ "MIICCAKCAgEA///////////JD9qiIWjCNMTGYouA3BzRKQJOCIpnzHQCC76mOxOb"
+ "IlFKCHmONATd75UZs806QxswKwpt8l8UN0/hNW1tUcJF5IW1dmJefsb0TELppjft"
+ "awv/XLb0Brft7jhr+1qJn6WunyQRfEsf5kkoZlHs5Fs9wgB8uKFjvwWY2kg2HFXT"
+ "mmkWP6j9JM9fg2VdI9yjrZYcYvNWIIVSu57VKQdwlpZtZww1Tkq8mATxdGwIyhgh"
+ "fDKQXkYuNs474553LBgOhgObJ4Oi7Aeij7XFXfBvTFLJ3ivL9pVYFxg5lUl86pVq"
+ "5RXSJhiY+gUQFXKOWoqqxC2tMxcNBFB6M6hVIavfHLpk7PuFBFjb7wqK6nFXXQYM"
+ "fbOXD4Wm4eTHq/WujNsJM9cejJTgSiVhnc7j0iYa0u5r8S/6BtmKCGTYdgJzPshq"
+ "ZFIfKxgXeyAMu+EXV3phXWx3CYjAutlG4gjiT6B05asxQ9tb/OD9EI5LgtEgqSEI"
+ "ARpyPBKnh+bXiHGaEL26WyaZwycYavTiPBqUaDS2FQvaJYPpyirUTOjbu8LbBN6O"
+ "+S6O/BQfvsqmKHxZR05rwF2ZspZPoJDDoiM7oYZRW+ftH2EpcM7i16+4G912IXBI"
+ "HNAGkSfVsFqpk7TqmI2P3cGG/7fckKbAj030Nck0BjGZ//////////8CAQU="
+ "-----END DH PARAMETERS-----");
+
config.set("dl", "modp/ietf/6144",
"-----BEGIN X942 DH PARAMETERS-----"
"MIIGDAKCAwEA///////////JD9qiIWjCNMTGYouA3BzRKQJOCIpnzHQCC76mOxOb"
@@ -451,6 +488,27 @@ void set_default_dl_groups(Library_State& config)
"jzbmIBJ//////////wIBAg=="
"-----END X942 DH PARAMETERS-----");
+ config.set("dl", "modp/srp/6144",
+ "-----BEGIN DH PARAMETERS-----"
+ "MIIDCAKCAwEA///////////JD9qiIWjCNMTGYouA3BzRKQJOCIpnzHQCC76mOxOb"
+ "IlFKCHmONATd75UZs806QxswKwpt8l8UN0/hNW1tUcJF5IW1dmJefsb0TELppjft"
+ "awv/XLb0Brft7jhr+1qJn6WunyQRfEsf5kkoZlHs5Fs9wgB8uKFjvwWY2kg2HFXT"
+ "mmkWP6j9JM9fg2VdI9yjrZYcYvNWIIVSu57VKQdwlpZtZww1Tkq8mATxdGwIyhgh"
+ "fDKQXkYuNs474553LBgOhgObJ4Oi7Aeij7XFXfBvTFLJ3ivL9pVYFxg5lUl86pVq"
+ "5RXSJhiY+gUQFXKOWoqqxC2tMxcNBFB6M6hVIavfHLpk7PuFBFjb7wqK6nFXXQYM"
+ "fbOXD4Wm4eTHq/WujNsJM9cejJTgSiVhnc7j0iYa0u5r8S/6BtmKCGTYdgJzPshq"
+ "ZFIfKxgXeyAMu+EXV3phXWx3CYjAutlG4gjiT6B05asxQ9tb/OD9EI5LgtEgqSEI"
+ "ARpyPBKnh+bXiHGaEL26WyaZwycYavTiPBqUaDS2FQvaJYPpyirUTOjbu8LbBN6O"
+ "+S6O/BQfvsqmKHxZR05rwF2ZspZPoJDDoiM7oYZRW+ftH2EpcM7i16+4G912IXBI"
+ "HNAGkSfVsFqpk7TqmI2P3cGG/7fckKbAj030Nck0AoSSNsP6tNJ8cCbB1NyyYCZG"
+ "3sl1HnY9uje9+P+UBq2eUw7l2zgvQTABrrBqU+2QJ9gxF5cnsIZaiRjaPtvrz5sU"
+ "7UTObLrO1Lsb238UR+bMJUszIFFRK9evQm+49AE3jNK/WYPKAcZLkuzwMuoV0XId"
+ "A/SC185udP721V5wL0aYDIK1qEAxkAscnlnnyX++x+jzI6l6fjbMiL4PHUW3/1ha"
+ "xUvUB7IrQVSqzI9tfr9I4dgUzF7SD4A34KeXFe7ym+MoBqHVi7fF2nb1UKo9ih+/"
+ "8OsZzLGjE9Vc2lbJ7C7yljI4f+jXbjwEaAQ+j2Y/SGDuEr8tWwt0dNbmlPkebcxA"
+ "JP//////////AgEF"
+ "-----END DH PARAMETERS-----");
+
config.set("dl", "modp/ietf/8192",
"-----BEGIN X942 DH PARAMETERS-----"
"MIIIDAKCBAEA///////////JD9qiIWjCNMTGYouA3BzRKQJOCIpnzHQCC76mOxOb"
@@ -498,6 +556,32 @@ void set_default_dl_groups(Library_State& config)
"034BNyPKrHIjqzv01U8YKHE7K0pv5A+rdEBctziwZMBuzHbp7///////////AgEC"
"-----END X942 DH PARAMETERS-----");
+ config.set("dl", "modp/srp/8192",
+ "-----BEGIN DH PARAMETERS-----"
+ "MIIECAKCBAEA///////////JD9qiIWjCNMTGYouA3BzRKQJOCIpnzHQCC76mOxOb"
+ "IlFKCHmONATd75UZs806QxswKwpt8l8UN0/hNW1tUcJF5IW1dmJefsb0TELppjft"
+ "awv/XLb0Brft7jhr+1qJn6WunyQRfEsf5kkoZlHs5Fs9wgB8uKFjvwWY2kg2HFXT"
+ "mmkWP6j9JM9fg2VdI9yjrZYcYvNWIIVSu57VKQdwlpZtZww1Tkq8mATxdGwIyhgh"
+ "fDKQXkYuNs474553LBgOhgObJ4Oi7Aeij7XFXfBvTFLJ3ivL9pVYFxg5lUl86pVq"
+ "5RXSJhiY+gUQFXKOWoqqxC2tMxcNBFB6M6hVIavfHLpk7PuFBFjb7wqK6nFXXQYM"
+ "fbOXD4Wm4eTHq/WujNsJM9cejJTgSiVhnc7j0iYa0u5r8S/6BtmKCGTYdgJzPshq"
+ "ZFIfKxgXeyAMu+EXV3phXWx3CYjAutlG4gjiT6B05asxQ9tb/OD9EI5LgtEgqSEI"
+ "ARpyPBKnh+bXiHGaEL26WyaZwycYavTiPBqUaDS2FQvaJYPpyirUTOjbu8LbBN6O"
+ "+S6O/BQfvsqmKHxZR05rwF2ZspZPoJDDoiM7oYZRW+ftH2EpcM7i16+4G912IXBI"
+ "HNAGkSfVsFqpk7TqmI2P3cGG/7fckKbAj030Nck0AoSSNsP6tNJ8cCbB1NyyYCZG"
+ "3sl1HnY9uje9+P+UBq2eUw7l2zgvQTABrrBqU+2QJ9gxF5cnsIZaiRjaPtvrz5sU"
+ "7UTObLrO1Lsb238UR+bMJUszIFFRK9evQm+49AE3jNK/WYPKAcZLkuzwMuoV0XId"
+ "A/SC185udP721V5wL0aYDIK1qEAxkAscnlnnyX++x+jzI6l6fjbMiL4PHUW3/1ha"
+ "xUvUB7IrQVSqzI9tfr9I4dgUzF7SD4A34KeXFe7ym+MoBqHVi7fF2nb1UKo9ih+/"
+ "8OsZzLGjE9Vc2lbJ7C7yljI4f+jXbjwEaAQ+j2Y/SGDuEr8tWwt0dNbmlPkebb4R"
+ "WXSjkm8S/uXkOHd8tqky34zYvsTQc7kxujvIMraNndMAdB+nv4r8R+0ldvaTa6Qk"
+ "ZjqrY5xa5PVoNCO0dCvxyXgjjxbL451lLeP9uL78hIrZIiIuBKQDfAcT61eoGiPw"
+ "xzRz/GRs6jBrS8vIhi+Dhd36nUt/osCH6HloMwPtW906Bis89bOieKZtKhP4P0T4"
+ "Ld8xDuB0q2o2RZfomaAlXcFk8xzFCEaFHfmrSBld7X6hsdUQvX7nTXP682vDHs+i"
+ "aDWQRvTrh5+SQAlDi0gcbNeImgAu1e44K8kZDab8Am5HlVjkR1Z36aqeMFDidlaU"
+ "38gfVuiAuW5xYMmA3Zjt09///////////wIBEw=="
+ "-----END DH PARAMETERS-----");
+
config.set("dl", "dsa/jce/512",
"-----BEGIN DSA PARAMETERS-----"
"MIGdAkEA/KaCzo4Syrom78z3EQ5SbbB4sF7ey80etKII864WF64B81uRpH5t9jQT"