diff options
author | lloyd <[email protected]> | 2008-04-17 16:03:11 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2008-04-17 16:03:11 +0000 |
commit | a2941106b36829e0b7187ca7d2a825175ced7fa4 (patch) | |
tree | 525d63e5400028afcbf727c2e97edb2b54c636de /include | |
parent | 9ea54fcb8b9172ce9a756a2ef1ade7138f7d6a34 (diff) | |
parent | 2ca8f36e3b41b751a9febcd0aa741ab532b7eb33 (diff) |
propagate from branch 'net.randombit.botan' (head 85596a0b1fbee6696261d36def7dad742375f7d9)
to branch 'net.randombit.botan.remove-libstate' (head faf75eec422a3eb6108748315724fb6ac217dede)
Diffstat (limited to 'include')
-rw-r--r-- | include/botan.h | 1 | ||||
-rw-r--r-- | include/buf_es.h | 1 | ||||
-rw-r--r-- | include/charset.h | 12 | ||||
-rw-r--r-- | include/def_char.h | 25 | ||||
-rw-r--r-- | include/libstate.h | 25 | ||||
-rw-r--r-- | include/modules.h | 4 | ||||
-rw-r--r-- | include/rng.h | 32 | ||||
-rw-r--r-- | include/timers.h | 6 | ||||
-rw-r--r-- | include/util.h | 3 | ||||
-rw-r--r-- | include/x509_ext.h | 2 | ||||
-rw-r--r-- | include/x509stat.h | 35 |
11 files changed, 8 insertions, 138 deletions
diff --git a/include/botan.h b/include/botan.h index 99c3864f3..a7b124da4 100644 --- a/include/botan.h +++ b/include/botan.h @@ -7,6 +7,5 @@ #include <botan/config.h> #include <botan/init.h> #include <botan/lookup.h> -#include <botan/rng.h> #include <botan/version.h> #include <botan/parsing.h> diff --git a/include/buf_es.h b/include/buf_es.h index 516866c79..4bf178ae7 100644 --- a/include/buf_es.h +++ b/include/buf_es.h @@ -24,7 +24,6 @@ class Buffered_EntropySource : public EntropySource void add_bytes(const void*, u32bit); void add_bytes(u64bit); - void add_timestamp(); virtual void do_slow_poll() = 0; virtual void do_fast_poll(); diff --git a/include/charset.h b/include/charset.h index 9c2be4c07..ac9f501a0 100644 --- a/include/charset.h +++ b/include/charset.h @@ -12,18 +12,6 @@ namespace Botan { -/************************************************* -* Character Set Transcoder Interface * -*************************************************/ -class Charset_Transcoder - { - public: - virtual std::string transcode(const std::string&, - Character_Set, Character_Set) const = 0; - - virtual ~Charset_Transcoder() {} - }; - namespace Charset { /************************************************* diff --git a/include/def_char.h b/include/def_char.h deleted file mode 100644 index 57080bd7f..000000000 --- a/include/def_char.h +++ /dev/null @@ -1,25 +0,0 @@ -/************************************************* -* Default Character Set Handling Header File * -* (C) 1999-2007 Jack Lloyd * -*************************************************/ - -#ifndef BOTAN_DEFAULT_CHARSET_H__ -#define BOTAN_DEFAULT_CHARSET_H__ - -#include <botan/charset.h> - -namespace Botan { - -/************************************************* -* Default Character Set Transcoder Object * -*************************************************/ -class Default_Charset_Transcoder : public Charset_Transcoder - { - public: - std::string transcode(const std::string&, - Character_Set, Character_Set) const; - }; - -} - -#endif diff --git a/include/libstate.h b/include/libstate.h index 40c4a94b0..7e83f57c6 100644 --- a/include/libstate.h +++ b/include/libstate.h @@ -42,19 +42,13 @@ class Library_State }; friend class Engine_Iterator; - class UI - { - public: - virtual void pulse(Pulse_Type) {} - virtual ~UI() {} - }; - Allocator* get_allocator(const std::string& = "") const; void add_allocator(Allocator*); void set_default_allocator(const std::string&) const; bool rng_is_seeded() const { return rng->is_seeded(); } void randomize(byte[], u32bit); + byte random(); void set_prng(RandomNumberGenerator*); void add_entropy_source(EntropySource*, bool = true); @@ -62,22 +56,9 @@ class Library_State void add_entropy(EntropySource&, bool); u32bit seed_prng(bool, u32bit); - void set_timer(class Timer*); - u64bit system_clock() const; - class Config& config() const; class Mutex* get_mutex() const; - - void set_x509_state(class X509_GlobalState*); - class X509_GlobalState& x509_state(); - - void pulse(Pulse_Type) const; - void set_ui(UI*); - - void set_transcoder(class Charset_Transcoder*); - std::string transcode(const std::string, - Character_Set, Character_Set) const; private: Library_State(const Library_State&) {} Library_State& operator=(const Library_State&) { return (*this); } @@ -89,15 +70,11 @@ class Library_State class Mutex* engine_lock; class Mutex* rng_lock; - class Timer* timer; mutable class Config* config_obj; - class X509_GlobalState* x509_state_obj; std::map<std::string, Allocator*> alloc_factory; mutable Allocator* cached_default_allocator; - UI* ui; - class Charset_Transcoder* transcoder; RandomNumberGenerator* rng; std::vector<Allocator*> allocators; std::vector<EntropySource*> entropy_sources; diff --git a/include/modules.h b/include/modules.h index 5b84e6ca1..76c1337ab 100644 --- a/include/modules.h +++ b/include/modules.h @@ -19,8 +19,6 @@ class Modules { public: virtual class Mutex_Factory* mutex_factory() const = 0; - virtual class Timer* timer() const = 0; - virtual class Charset_Transcoder* transcoder() const = 0; virtual std::string default_allocator() const = 0; @@ -38,8 +36,6 @@ class Builtin_Modules : public Modules { public: class Mutex_Factory* mutex_factory() const; - class Timer* timer() const; - class Charset_Transcoder* transcoder() const; std::string default_allocator() const; diff --git a/include/rng.h b/include/rng.h deleted file mode 100644 index fee9c088f..000000000 --- a/include/rng.h +++ /dev/null @@ -1,32 +0,0 @@ -/************************************************* -* Global RNG Header File * -* (C) 1999-2007 Jack Lloyd * -*************************************************/ - -#ifndef BOTAN_GLOBAL_RNG_H__ -#define BOTAN_GLOBAL_RNG_H__ - -#include <botan/base.h> - -namespace Botan { - -/************************************************* -* RNG Access and Seeding Functions * -*************************************************/ -namespace Global_RNG { - -void randomize(byte[], u32bit); -byte random(); - -void add_entropy(const byte[], u32bit); -void add_entropy(EntropySource&, bool = true); - -u32bit seed(bool = true, u32bit = 256); - -void add_es(EntropySource*, bool = true); - -} - -} - -#endif diff --git a/include/timers.h b/include/timers.h index c4213de5b..abceda449 100644 --- a/include/timers.h +++ b/include/timers.h @@ -6,17 +6,19 @@ #ifndef BOTAN_TIMERS_H__ #define BOTAN_TIMERS_H__ -#include <botan/types.h> +#include <botan/base.h> namespace Botan { /************************************************* * Timer Interface * *************************************************/ -class Timer +class Timer : public EntropySource { public: virtual u64bit clock() const; + u32bit slow_poll(byte[], u32bit); + virtual ~Timer() {} protected: static u64bit combine_timers(u32bit, u32bit, u32bit); diff --git a/include/util.h b/include/util.h index f3817cd7e..022026bc4 100644 --- a/include/util.h +++ b/include/util.h @@ -11,10 +11,9 @@ namespace Botan { /************************************************* -* Timer Access Functions * +* Time Access Functions * *************************************************/ u64bit system_time(); -u64bit system_clock(); /************************************************* * Memory Locking Functions * diff --git a/include/x509_ext.h b/include/x509_ext.h index 85aa47c92..b715de2e9 100644 --- a/include/x509_ext.h +++ b/include/x509_ext.h @@ -56,6 +56,8 @@ class Extensions : public ASN1_Object Extensions(bool st = true) : should_throw(st) {} ~Extensions(); private: + static Certificate_Extension* get_extension(const OID&); + std::vector<Certificate_Extension*> extensions; bool should_throw; }; diff --git a/include/x509stat.h b/include/x509stat.h deleted file mode 100644 index 4f734941f..000000000 --- a/include/x509stat.h +++ /dev/null @@ -1,35 +0,0 @@ -/************************************************* -* Globally Saved X.509 State Header * -* (C) 1999-2007 Jack Lloyd * -*************************************************/ - -#include <botan/asn1_oid.h> - -namespace Botan { - -/************************************************* -* Prototype for a Certificate Extension * -*************************************************/ -class Extension_Prototype - { - public: - virtual class Certificate_Extension* make(const OID&) = 0; - virtual ~Extension_Prototype() {} - }; - -/************************************************* -* X.509 Global State * -*************************************************/ -class X509_GlobalState - { - public: - void add(Extension_Prototype*); - class Certificate_Extension* get_extension(const OID&) const; - - X509_GlobalState(); - ~X509_GlobalState(); - private: - std::vector<Extension_Prototype*> prototypes; - }; - -} |