diff options
Diffstat (limited to 'src/libstate')
-rw-r--r-- | src/libstate/botan.h | 2 | ||||
-rw-r--r-- | src/libstate/get_enc.cpp | 34 | ||||
-rw-r--r-- | src/libstate/init.cpp | 16 | ||||
-rw-r--r-- | src/libstate/init.h | 4 | ||||
-rw-r--r-- | src/libstate/libstate.cpp | 118 | ||||
-rw-r--r-- | src/libstate/libstate.h | 22 | ||||
-rw-r--r-- | src/libstate/look_pk.cpp | 46 | ||||
-rw-r--r-- | src/libstate/look_pk.h | 10 | ||||
-rw-r--r-- | src/libstate/lookup.cpp | 10 | ||||
-rw-r--r-- | src/libstate/lookup.h | 40 | ||||
-rw-r--r-- | src/libstate/oid_lookup/oids.cpp | 40 | ||||
-rw-r--r-- | src/libstate/oid_lookup/oids.h | 10 | ||||
-rw-r--r-- | src/libstate/pk_engine.cpp | 58 | ||||
-rw-r--r-- | src/libstate/pk_engine.h | 8 | ||||
-rw-r--r-- | src/libstate/policy.cpp | 46 |
15 files changed, 247 insertions, 217 deletions
diff --git a/src/libstate/botan.h b/src/libstate/botan.h index db5e2217e..3fa131216 100644 --- a/src/libstate/botan.h +++ b/src/libstate/botan.h @@ -1,6 +1,8 @@ /** * A vague catch all include file for Botan * (C) 1999-2007 Jack Lloyd +* +* Distributed under the terms of the Botan license */ #include <botan/init.h> diff --git a/src/libstate/get_enc.cpp b/src/libstate/get_enc.cpp index c34caf30b..ab4d15896 100644 --- a/src/libstate/get_enc.cpp +++ b/src/libstate/get_enc.cpp @@ -1,7 +1,9 @@ -/************************************************* -* PBKDF/EMSA/EME/KDF/MGF Retrieval Source File * -* (C) 1999-2007 Jack Lloyd * -*************************************************/ +/* +* PBKDF/EMSA/EME/KDF/MGF Retrieval +* (C) 1999-2007 Jack Lloyd +* +* Distributed under the terms of the Botan license +*/ #include <botan/lookup.h> #include <botan/libstate.h> @@ -78,9 +80,9 @@ namespace Botan { -/************************************************* -* Get a S2K algorithm by name * -*************************************************/ +/* +* Get a S2K algorithm by name +*/ S2K* get_s2k(const std::string& algo_spec) { SCAN_Name request(algo_spec); @@ -105,9 +107,9 @@ S2K* get_s2k(const std::string& algo_spec) throw Algorithm_Not_Found(algo_spec); } -/************************************************* -* Get an EMSA by name * -*************************************************/ +/* +* Get an EMSA by name +*/ EMSA* get_emsa(const std::string& algo_spec) { SCAN_Name request(algo_spec); @@ -162,9 +164,9 @@ EMSA* get_emsa(const std::string& algo_spec) throw Algorithm_Not_Found(algo_spec); } -/************************************************* -* Get an EME by name * -*************************************************/ +/* +* Get an EME by name +*/ EME* get_eme(const std::string& algo_spec) { SCAN_Name request(algo_spec); @@ -193,9 +195,9 @@ EME* get_eme(const std::string& algo_spec) throw Algorithm_Not_Found(algo_spec); } -/************************************************* -* Get an KDF by name * -*************************************************/ +/* +* Get an KDF by name +*/ KDF* get_kdf(const std::string& algo_spec) { SCAN_Name request(algo_spec); diff --git a/src/libstate/init.cpp b/src/libstate/init.cpp index 377055bd4..b908de6c7 100644 --- a/src/libstate/init.cpp +++ b/src/libstate/init.cpp @@ -1,6 +1,8 @@ /** -* Default Initialization Function Source File +* Default Initialization Function * (C) 1999-2007 Jack Lloyd +* +* Distributed under the terms of the Botan license */ #include <botan/init.h> @@ -9,9 +11,9 @@ namespace Botan { -/************************************************* -* Library Initialization * -*************************************************/ +/* +* Library Initialization +*/ void LibraryInitializer::initialize(const std::string& arg_string) { bool thread_safe = false; @@ -62,9 +64,9 @@ void LibraryInitializer::initialize(const std::string& arg_string) } } -/************************************************* -* Library Shutdown * -*************************************************/ +/* +* Library Shutdown +*/ void LibraryInitializer::deinitialize() { set_global_state(0); diff --git a/src/libstate/init.h b/src/libstate/init.h index 1339d49a5..254f9458b 100644 --- a/src/libstate/init.h +++ b/src/libstate/init.h @@ -1,6 +1,8 @@ /** -* Library Initialization Header File +* Library Initialization * (C) 1999-2008 Jack Lloyd +* +* Distributed under the terms of the Botan license */ #ifndef BOTAN_LIBRARY_INITIALIZER_H__ diff --git a/src/libstate/libstate.cpp b/src/libstate/libstate.cpp index b75fbae88..3275c6493 100644 --- a/src/libstate/libstate.cpp +++ b/src/libstate/libstate.cpp @@ -1,7 +1,9 @@ -/************************************************* -* Library Internal/Global State Source File * -* (C) 1999-2008 Jack Lloyd * -*************************************************/ +/* +* Library Internal/Global State +* (C) 1999-2008 Jack Lloyd +* +* Distributed under the terms of the Botan license +*/ #include <botan/libstate.h> #include <botan/init.h> @@ -48,18 +50,18 @@ namespace Botan { -/************************************************* -* Botan's global state * -*************************************************/ +/* +* Botan's global state +*/ namespace { Library_State* global_lib_state = 0; } -/************************************************* -* Access the global state object * -*************************************************/ +/* +* Access the global state object +*/ Library_State& global_state() { /* Lazy initialization. Botan still needs to be deinitialized later @@ -71,17 +73,17 @@ Library_State& global_state() return (*global_lib_state); } -/************************************************* -* Set a new global state object * -*************************************************/ +/* +* Set a new global state object +*/ void set_global_state(Library_State* new_state) { delete swap_global_state(new_state); } -/************************************************* -* Swap two global state objects * -*************************************************/ +/* +* Swap two global state objects +*/ Library_State* swap_global_state(Library_State* new_state) { Library_State* old_state = global_lib_state; @@ -89,17 +91,17 @@ Library_State* swap_global_state(Library_State* new_state) return old_state; } -/************************************************* -* Get a new mutex object * -*************************************************/ +/* +* Get a new mutex object +*/ Mutex* Library_State::get_mutex() const { return mutex_factory->make(); } -/************************************************* -* Get an allocator by its name * -*************************************************/ +/* +* Get an allocator by its name +*/ Allocator* Library_State::get_allocator(const std::string& type) const { Mutex_Holder lock(allocator_lock); @@ -121,9 +123,9 @@ Allocator* Library_State::get_allocator(const std::string& type) const return cached_default_allocator; } -/************************************************* -* Create a new name to object mapping * -*************************************************/ +/* +* Create a new name to object mapping +*/ void Library_State::add_allocator(Allocator* allocator) { Mutex_Holder lock(allocator_lock); @@ -134,9 +136,9 @@ void Library_State::add_allocator(Allocator* allocator) alloc_factory[allocator->type()] = allocator; } -/************************************************* -* Set the default allocator type * -*************************************************/ +/* +* Set the default allocator type +*/ void Library_State::set_default_allocator(const std::string& type) { Mutex_Holder lock(allocator_lock); @@ -148,9 +150,9 @@ void Library_State::set_default_allocator(const std::string& type) cached_default_allocator = 0; } -/************************************************* -* Get a configuration value * -*************************************************/ +/* +* Get a configuration value +*/ std::string Library_State::get(const std::string& section, const std::string& key) const { @@ -160,9 +162,9 @@ std::string Library_State::get(const std::string& section, section + "/" + key, ""); } -/************************************************* -* See if a particular option has been set * -*************************************************/ +/* +* See if a particular option has been set +*/ bool Library_State::is_set(const std::string& section, const std::string& key) const { @@ -171,9 +173,9 @@ bool Library_State::is_set(const std::string& section, return search_map(config, section + "/" + key, false, true); } -/************************************************* -* Set a configuration value * -*************************************************/ +/* +* Set a configuration value +*/ void Library_State::set(const std::string& section, const std::string& key, const std::string& value, bool overwrite) { @@ -188,17 +190,17 @@ void Library_State::set(const std::string& section, const std::string& key, config[full_key] = value; } -/************************************************* -* Add an alias * -*************************************************/ +/* +* Add an alias +*/ void Library_State::add_alias(const std::string& key, const std::string& value) { set("alias", key, value); } -/************************************************* -* Dereference an alias to a fixed name * -*************************************************/ +/* +* Dereference an alias to a fixed name +*/ std::string Library_State::deref_alias(const std::string& key) const { std::string result = key; @@ -207,18 +209,18 @@ std::string Library_State::deref_alias(const std::string& key) const return result; } -/************************************************* -* Set/Add an option * -*************************************************/ +/* +* Set/Add an option +*/ void Library_State::set_option(const std::string key, const std::string& value) { set("conf", key, value); } -/************************************************* -* Get an option value * -*************************************************/ +/* +* Get an option value +*/ std::string Library_State::option(const std::string& key) const { return get("conf", key); @@ -234,9 +236,9 @@ Algorithm_Factory& Library_State::algorithm_factory() return *m_algorithm_factory; } -/************************************************* -* Load a set of modules * -*************************************************/ +/* +* Load a set of modules +*/ void Library_State::initialize(bool thread_safe) { if(mutex_factory) @@ -302,9 +304,9 @@ void Library_State::initialize(bool thread_safe) m_algorithm_factory = new Algorithm_Factory(engines, *mutex_factory); } -/************************************************* -* Library_State Constructor * -*************************************************/ +/* +* Library_State Constructor +*/ Library_State::Library_State() { mutex_factory = 0; @@ -313,9 +315,9 @@ Library_State::Library_State() m_algorithm_factory = 0; } -/************************************************* -* Library_State Destructor * -*************************************************/ +/* +* Library_State Destructor +*/ Library_State::~Library_State() { delete m_algorithm_factory; diff --git a/src/libstate/libstate.h b/src/libstate/libstate.h index e45d1a7f3..2493863a9 100644 --- a/src/libstate/libstate.h +++ b/src/libstate/libstate.h @@ -1,7 +1,9 @@ -/************************************************* -* Library Internal/Global State Header File * -* (C) 1999-2008 Jack Lloyd * -*************************************************/ +/* +* Library Internal/Global State +* (C) 1999-2008 Jack Lloyd +* +* Distributed under the terms of the Botan license +*/ #ifndef BOTAN_LIB_STATE_H__ #define BOTAN_LIB_STATE_H__ @@ -16,9 +18,9 @@ namespace Botan { -/************************************************* -* Global State Container Base * -*************************************************/ +/* +* Global State Container Base +*/ class BOTAN_DLL Library_State { public: @@ -111,9 +113,9 @@ class BOTAN_DLL Library_State Algorithm_Factory* m_algorithm_factory; }; -/************************************************* -* Global State * -*************************************************/ +/* +* Global State +*/ BOTAN_DLL Library_State& global_state(); BOTAN_DLL void set_global_state(Library_State*); BOTAN_DLL Library_State* swap_global_state(Library_State*); diff --git a/src/libstate/look_pk.cpp b/src/libstate/look_pk.cpp index d72c1ce0f..8eb473858 100644 --- a/src/libstate/look_pk.cpp +++ b/src/libstate/look_pk.cpp @@ -1,34 +1,36 @@ -/************************************************* -* PK Algorithm Lookup Source File * -* (C) 1999-2007 Jack Lloyd * -*************************************************/ +/* +* PK Algorithm Lookup +* (C) 1999-2007 Jack Lloyd +* +* Distributed under the terms of the Botan license +*/ #include <botan/look_pk.h> #include <botan/lookup.h> namespace Botan { -/************************************************* -* Get a PK_Encryptor object * -*************************************************/ +/* +* Get a PK_Encryptor object +*/ PK_Encryptor* get_pk_encryptor(const PK_Encrypting_Key& key, const std::string& eme) { return new PK_Encryptor_MR_with_EME(key, get_eme(eme)); } -/************************************************* -* Get a PK_Decryptor object * -*************************************************/ +/* +* Get a PK_Decryptor object +*/ PK_Decryptor* get_pk_decryptor(const PK_Decrypting_Key& key, const std::string& eme) { return new PK_Decryptor_MR_with_EME(key, get_eme(eme)); } -/************************************************* -* Get a PK_Signer object * -*************************************************/ +/* +* Get a PK_Signer object +*/ PK_Signer* get_pk_signer(const PK_Signing_Key& key, const std::string& emsa, Signature_Format sig_format) @@ -38,9 +40,9 @@ PK_Signer* get_pk_signer(const PK_Signing_Key& key, return signer; } -/************************************************* -* Get a PK_Verifier object * -*************************************************/ +/* +* Get a PK_Verifier object +*/ PK_Verifier* get_pk_verifier(const PK_Verifying_with_MR_Key& key, const std::string& emsa, Signature_Format sig_format) @@ -50,9 +52,9 @@ PK_Verifier* get_pk_verifier(const PK_Verifying_with_MR_Key& key, return verifier; } -/************************************************* -* Get a PK_Verifier object * -*************************************************/ +/* +* Get a PK_Verifier object +*/ PK_Verifier* get_pk_verifier(const PK_Verifying_wo_MR_Key& key, const std::string& emsa, Signature_Format sig_format) @@ -62,9 +64,9 @@ PK_Verifier* get_pk_verifier(const PK_Verifying_wo_MR_Key& key, return verifier; } -/************************************************* -* Get a PK_Key_Agreement object * -*************************************************/ +/* +* Get a PK_Key_Agreement object +*/ PK_Key_Agreement* get_pk_kas(const PK_Key_Agreement_Key& key, const std::string& kdf) { diff --git a/src/libstate/look_pk.h b/src/libstate/look_pk.h index 926416a41..27b67dc5b 100644 --- a/src/libstate/look_pk.h +++ b/src/libstate/look_pk.h @@ -1,7 +1,9 @@ -/************************************************* -* PK Algorithm Lookup Header File * -* (C) 1999-2007 Jack Lloyd * -*************************************************/ +/* +* PK Algorithm Lookup +* (C) 1999-2007 Jack Lloyd +* +* Distributed under the terms of the Botan license +*/ #ifndef BOTAN_PK_LOOKUP_H__ #define BOTAN_PK_LOOKUP_H__ diff --git a/src/libstate/lookup.cpp b/src/libstate/lookup.cpp index adf3d80ed..3b49116f6 100644 --- a/src/libstate/lookup.cpp +++ b/src/libstate/lookup.cpp @@ -1,7 +1,9 @@ -/************************************************* -* Algorithm Retrieval Source File * -* (C) 1999-2007 Jack Lloyd * -*************************************************/ +/* +* Algorithm Retrieval +* (C) 1999-2007 Jack Lloyd +* +* Distributed under the terms of the Botan license +*/ #include <botan/lookup.h> #include <botan/libstate.h> diff --git a/src/libstate/lookup.h b/src/libstate/lookup.h index a00cd3fb1..0f48dddfb 100644 --- a/src/libstate/lookup.h +++ b/src/libstate/lookup.h @@ -1,7 +1,9 @@ -/************************************************* -* Algorithm Lookup Header File * -* (C) 1999-2007 Jack Lloyd * -*************************************************/ +/* +* Algorithm Lookup +* (C) 1999-2007 Jack Lloyd +* +* Distributed under the terms of the Botan license +*/ #ifndef BOTAN_LOOKUP_H__ #define BOTAN_LOOKUP_H__ @@ -20,9 +22,9 @@ namespace Botan { -/************************************************* -* Retrieve an object from the lookup table * -*************************************************/ +/* +* Retrieve an object from the lookup table +*/ // NOTE: these functions return internally stored objects, library // retains ownership @@ -38,9 +40,9 @@ retrieve_hash(const std::string&); BOTAN_DLL const MessageAuthenticationCode* retrieve_mac(const std::string&); -/************************************************* -* Get an algorithm object * -*************************************************/ +/* +* Get an algorithm object +*/ // NOTE: these functions create and return new objects, letting the // caller assume ownership of them @@ -80,9 +82,9 @@ BOTAN_DLL MessageAuthenticationCode* get_mac(const std::string& name); */ BOTAN_DLL S2K* get_s2k(const std::string& name); -/************************************************* -* Get an EMSA/EME/KDF/MGF function * -*************************************************/ +/* +* Get an EMSA/EME/KDF/MGF function +*/ // NOTE: these functions create and return new objects, letting the // caller assume ownership of them @@ -108,9 +110,9 @@ BOTAN_DLL EMSA* get_emsa(const std::string& name); */ BOTAN_DLL KDF* get_kdf(const std::string& name); -/************************************************* -* Get a cipher object * -*************************************************/ +/* +* Get a cipher object +*/ /** * Factory method for general symmetric cipher filters. @@ -184,9 +186,9 @@ BOTAN_DLL bool have_hash(const std::string& name); */ BOTAN_DLL bool have_mac(const std::string& name); -/************************************************* -* Query information about an algorithm * -*************************************************/ +/* +* Query information about an algorithm +*/ /** * Find out the block size of a certain symmetric algorithm. diff --git a/src/libstate/oid_lookup/oids.cpp b/src/libstate/oid_lookup/oids.cpp index 0823625ea..232c63360 100644 --- a/src/libstate/oid_lookup/oids.cpp +++ b/src/libstate/oid_lookup/oids.cpp @@ -1,7 +1,9 @@ -/************************************************* -* OID Registry Source File * -* (C) 1999-2008 Jack Lloyd * -*************************************************/ +/* +* OID Registry +* (C) 1999-2008 Jack Lloyd +* +* Distributed under the terms of the Botan license +*/ #include <botan/oids.h> #include <botan/libstate.h> @@ -10,9 +12,9 @@ namespace Botan { namespace OIDS { -/************************************************* -* Register an OID to string mapping * -*************************************************/ +/* +* Register an OID to string mapping +*/ void add_oid(const OID& oid, const std::string& name) { const std::string oid_str = oid.as_string(); @@ -23,9 +25,9 @@ void add_oid(const OID& oid, const std::string& name) global_state().set("str2oid", name, oid_str); } -/************************************************* -* Do an OID to string lookup * -*************************************************/ +/* +* Do an OID to string lookup +*/ std::string lookup(const OID& oid) { std::string name = global_state().get("oid2str", oid.as_string()); @@ -34,9 +36,9 @@ std::string lookup(const OID& oid) return name; } -/************************************************* -* Do a string to OID lookup * -*************************************************/ +/* +* Do a string to OID lookup +*/ OID lookup(const std::string& name) { std::string value = global_state().get("str2oid", name); @@ -53,17 +55,17 @@ OID lookup(const std::string& name) } } -/************************************************* -* Check to see if an OID exists in the table * -*************************************************/ +/* +* Check to see if an OID exists in the table +*/ bool have_oid(const std::string& name) { return global_state().is_set("str2oid", name); } -/************************************************* -* Check to see if an OID exists in the table * -*************************************************/ +/* +* Check to see if an OID exists in the table +*/ bool name_of(const OID& oid, const std::string& name) { return (oid == lookup(name)); diff --git a/src/libstate/oid_lookup/oids.h b/src/libstate/oid_lookup/oids.h index 0df95fb36..fdfe61f7c 100644 --- a/src/libstate/oid_lookup/oids.h +++ b/src/libstate/oid_lookup/oids.h @@ -1,7 +1,9 @@ -/************************************************* -* OID Registry Header File * -* (C) 1999-2007 Jack Lloyd * -*************************************************/ +/* +* OID Registry +* (C) 1999-2007 Jack Lloyd +* +* Distributed under the terms of the Botan license +*/ #ifndef BOTAN_OIDS_H__ #define BOTAN_OIDS_H__ diff --git a/src/libstate/pk_engine.cpp b/src/libstate/pk_engine.cpp index 5904ce1f9..790ddcde4 100644 --- a/src/libstate/pk_engine.cpp +++ b/src/libstate/pk_engine.cpp @@ -1,7 +1,9 @@ -/************************************************* -* PK Engine Lookup Source File * -* (C) 1999-2007 Jack Lloyd * -*************************************************/ +/* +* PK Engine Lookup +* (C) 1999-2007 Jack Lloyd +* +* Distributed under the terms of the Botan license +*/ #include <botan/pk_engine.h> #include <botan/libstate.h> @@ -12,9 +14,9 @@ namespace Botan { namespace Engine_Core { #if defined(BOTAN_HAS_IF_PUBLIC_KEY_FAMILY) -/************************************************* -* Acquire an IF op * -*************************************************/ +/* +* Acquire an IF op +*/ IF_Operation* if_op(const BigInt& e, const BigInt& n, const BigInt& d, const BigInt& p, const BigInt& q, const BigInt& d1, const BigInt& d2, const BigInt& c) @@ -33,9 +35,9 @@ IF_Operation* if_op(const BigInt& e, const BigInt& n, const BigInt& d, #endif #if defined(BOTAN_HAS_DSA) -/************************************************* -* Acquire a DSA op * -*************************************************/ +/* +* Acquire a DSA op +*/ DSA_Operation* dsa_op(const DL_Group& group, const BigInt& y, const BigInt& x) { Algorithm_Factory::Engine_Iterator i(global_state().algorithm_factory()); @@ -52,9 +54,9 @@ DSA_Operation* dsa_op(const DL_Group& group, const BigInt& y, const BigInt& x) #endif #if defined(BOTAN_HAS_NYBERG_RUEPPEL) -/************************************************* -* Acquire a NR op * -*************************************************/ +/* +* Acquire a NR op +*/ NR_Operation* nr_op(const DL_Group& group, const BigInt& y, const BigInt& x) { Algorithm_Factory::Engine_Iterator i(global_state().algorithm_factory()); @@ -71,9 +73,9 @@ NR_Operation* nr_op(const DL_Group& group, const BigInt& y, const BigInt& x) #endif #if defined(BOTAN_HAS_ELGAMAL) -/************************************************* -* Acquire an ElGamal op * -*************************************************/ +/* +* Acquire an ElGamal op +*/ ELG_Operation* elg_op(const DL_Group& group, const BigInt& y, const BigInt& x) { Algorithm_Factory::Engine_Iterator i(global_state().algorithm_factory()); @@ -90,9 +92,9 @@ ELG_Operation* elg_op(const DL_Group& group, const BigInt& y, const BigInt& x) #endif #if defined(BOTAN_HAS_DIFFIE_HELLMAN) -/************************************************* -* Acquire a DH op * -*************************************************/ +/* +* Acquire a DH op +*/ DH_Operation* dh_op(const DL_Group& group, const BigInt& x) { Algorithm_Factory::Engine_Iterator i(global_state().algorithm_factory()); @@ -109,9 +111,9 @@ DH_Operation* dh_op(const DL_Group& group, const BigInt& x) #endif #if defined(BOTAN_HAS_ECDSA) -/************************************************* -* Acquire an ECDSA op * -*************************************************/ +/* +* Acquire an ECDSA op +*/ ECDSA_Operation* ecdsa_op(const EC_Domain_Params& dom_pars, const BigInt& priv_key, const PointGFp& pub_key) @@ -130,9 +132,9 @@ ECDSA_Operation* ecdsa_op(const EC_Domain_Params& dom_pars, #endif #if defined(BOTAN_HAS_ECKAEG) -/************************************************* -* Acquire a ECKAEG op * -*************************************************/ +/* +* Acquire a ECKAEG op +*/ ECKAEG_Operation* eckaeg_op(const EC_Domain_Params& dom_pars, const BigInt& priv_key, const PointGFp& pub_key) @@ -150,9 +152,9 @@ ECKAEG_Operation* eckaeg_op(const EC_Domain_Params& dom_pars, } #endif -/************************************************* -* Acquire a modular exponentiator * -*************************************************/ +/* +* Acquire a modular exponentiator +*/ Modular_Exponentiator* mod_exp(const BigInt& n, Power_Mod::Usage_Hints hints) { Algorithm_Factory::Engine_Iterator i(global_state().algorithm_factory()); diff --git a/src/libstate/pk_engine.h b/src/libstate/pk_engine.h index 4c54f46e1..3f8650a4e 100644 --- a/src/libstate/pk_engine.h +++ b/src/libstate/pk_engine.h @@ -1,6 +1,8 @@ /** * Engine for PK * (C) 1999-2007 Jack Lloyd +* +* Distributed under the terms of the Botan license */ #ifndef BOTAN_ENGINE_PK_LOOKUP_H__ @@ -46,9 +48,9 @@ class Modular_Exponentiator; namespace Engine_Core { -/************************************************* -* Get an operation from an Engine * -*************************************************/ +/* +* Get an operation from an Engine +*/ Modular_Exponentiator* mod_exp(const BigInt&, Power_Mod::Usage_Hints); #if defined(BOTAN_HAS_IF_PUBLIC_KEY_FAMILY) diff --git a/src/libstate/policy.cpp b/src/libstate/policy.cpp index 0f6044790..dfc1dfc7a 100644 --- a/src/libstate/policy.cpp +++ b/src/libstate/policy.cpp @@ -1,7 +1,9 @@ -/************************************************* -* Default Policy Source File * -* (C) 1999-2008 Jack Lloyd * -*************************************************/ +/* +* Default Policy +* (C) 1999-2008 Jack Lloyd +* +* Distributed under the terms of the Botan license +*/ #include <botan/libstate.h> @@ -9,9 +11,9 @@ namespace Botan { namespace { -/************************************************* -* OID loading helper function * -*************************************************/ +/* +* OID loading helper function +*/ void add_oid(Library_State& config, const std::string& oid_str, const std::string& name) @@ -22,9 +24,9 @@ void add_oid(Library_State& config, config.set("str2oid", name, oid_str); } -/************************************************* -* Load all of the default OIDs * -*************************************************/ +/* +* Load all of the default OIDs +*/ void set_default_oids(Library_State& config) { /* Public key types */ @@ -185,9 +187,9 @@ void set_default_oids(Library_State& config) "CertificateHolderAuthorizationTemplate"); } -/************************************************* -* Set the default algorithm aliases * -*************************************************/ +/* +* Set the default algorithm aliases +*/ void set_default_aliases(Library_State& config) { config.add_alias("OpenPGP.Cipher.1", "IDEA"); @@ -228,9 +230,9 @@ void set_default_aliases(Library_State& config) config.add_alias("GOST", "GOST-28147-89"); } -/************************************************* -* Set the default configuration toggles * -*************************************************/ +/* +* Set the default configuration toggles +*/ void set_default_config(Library_State& config) { config.set_option("base/default_allocator", "malloc"); @@ -245,9 +247,9 @@ void set_default_config(Library_State& config) config.set_option("x509/exts/crl_number", "yes"); } -/************************************************* -* Set the built-in discrete log groups * -*************************************************/ +/* +* Set the built-in discrete log groups +*/ void set_default_dl_groups(Library_State& config) { config.set("dl", "modp/ietf/768", @@ -495,9 +497,9 @@ void set_default_dl_groups(Library_State& config) } } -/************************************************* -* Set the default policy * -*************************************************/ +/* +* Set the default policy +*/ void Library_State::load_default_config() { set_default_config(*this); |