aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorlloyd <[email protected]>2007-12-24 20:57:31 +0000
committerlloyd <[email protected]>2007-12-24 20:57:31 +0000
commiteff9a5f8056f9556d28902871e129a6f2f076e51 (patch)
tree2c0a218510837e6ff112e1fa709b6e6c4a3f4e49 /include
parent1ea96f920373b411ae08c9c9141845f2e4a96efc (diff)
parent769e503fd8e4cf0f3072e04afffb61db5b48d777 (diff)
merge of '3d9e9476c5b2a2ee125eee7e0dd10bfe460d0546'
and '9fe0310805932b889bdfa17c9213f2b97d47ab6a'
Diffstat (limited to 'include')
-rw-r--r--include/allocate.h6
-rw-r--r--include/asn1_obj.h2
-rw-r--r--include/bit_ops.h12
-rw-r--r--include/cbc_mac.h36
-rw-r--r--include/defalloc.h9
-rw-r--r--include/es_file.h24
-rw-r--r--include/idea.h1
-rw-r--r--include/init.h2
-rw-r--r--include/libstate.h19
-rw-r--r--include/parsing.h6
-rw-r--r--include/x509self.h2
11 files changed, 69 insertions, 50 deletions
diff --git a/include/allocate.h b/include/allocate.h
index ec5868a47..eabfe1c79 100644
--- a/include/allocate.h
+++ b/include/allocate.h
@@ -12,7 +12,7 @@
namespace Botan {
/*************************************************
-* Allocator *
+* Allocator Interface *
*************************************************/
class Allocator
{
@@ -30,10 +30,6 @@ class Allocator
virtual ~Allocator() {}
};
-/*************************************************
-* Get an allocator *
-*************************************************/
-
}
#endif
diff --git a/include/asn1_obj.h b/include/asn1_obj.h
index 46ba5c678..99aefbca3 100644
--- a/include/asn1_obj.h
+++ b/include/asn1_obj.h
@@ -129,7 +129,7 @@ class AlternativeName : public ASN1_Object
bool has_items() const;
AlternativeName(const std::string& = "", const std::string& = "",
- const std::string& = "");
+ const std::string& = "", const std::string& = "");
private:
std::multimap<std::string, std::string> alt_info;
std::multimap<OID, ASN1_String> othernames;
diff --git a/include/bit_ops.h b/include/bit_ops.h
index 5883d2163..9949a1dbb 100644
--- a/include/bit_ops.h
+++ b/include/bit_ops.h
@@ -7,7 +7,6 @@
#define BOTAN_BIT_OPS_H__
#include <botan/types.h>
-#include <botan/loadstor.h>
namespace Botan {
@@ -25,13 +24,20 @@ template<typename T> inline T rotate_right(T input, u32bit rot)
}
/*************************************************
-* XOR Functions *
+* Byteswap *
+*************************************************/
+u16bit reverse_bytes(u16bit);
+u32bit reverse_bytes(u32bit);
+u64bit reverse_bytes(u64bit);
+
+/*************************************************
+* Array XOR *
*************************************************/
void xor_buf(byte[], const byte[], u32bit);
void xor_buf(byte[], const byte[], const byte[], u32bit);
/*************************************************
-* Misc Utility Functions *
+* Simple Bit Manipulation *
*************************************************/
bool power_of_2(u64bit);
u32bit high_bit(u64bit);
diff --git a/include/cbc_mac.h b/include/cbc_mac.h
new file mode 100644
index 000000000..aec1c42f1
--- /dev/null
+++ b/include/cbc_mac.h
@@ -0,0 +1,36 @@
+/*************************************************
+* CBC-MAC Header File *
+* (C) 1999-2007 The Botan Project *
+*************************************************/
+
+#ifndef BOTAN_CBC_MAC__
+#define BOTAN_CBC_MAC__
+
+#include <botan/base.h>
+
+namespace Botan {
+
+/*************************************************
+* CBC-MAC *
+*************************************************/
+class CBC_MAC : public MessageAuthenticationCode
+ {
+ public:
+ void clear() throw();
+ std::string name() const;
+ MessageAuthenticationCode* clone() const;
+ CBC_MAC(const std::string&);
+ ~CBC_MAC();
+ private:
+ void add_data(const byte[], u32bit);
+ void final_result(byte[]);
+ void key(const byte[], u32bit);
+
+ BlockCipher* e;
+ SecureVector<byte> state;
+ u32bit position;
+ };
+
+}
+
+#endif
diff --git a/include/defalloc.h b/include/defalloc.h
index 184378d84..c663116d0 100644
--- a/include/defalloc.h
+++ b/include/defalloc.h
@@ -13,14 +13,13 @@ namespace Botan {
/*************************************************
* Malloc Allocator *
*************************************************/
-class Malloc_Allocator : public Pooling_Allocator
+class Malloc_Allocator : public Allocator
{
public:
- Malloc_Allocator() : Pooling_Allocator(64*1024, false) {}
+ void* allocate(u32bit);
+ void deallocate(void*, u32bit);
+
std::string type() const { return "malloc"; }
- private:
- void* alloc_block(u32bit);
- void dealloc_block(void*, u32bit);
};
/*************************************************
diff --git a/include/es_file.h b/include/es_file.h
deleted file mode 100644
index 5be6eccdc..000000000
--- a/include/es_file.h
+++ /dev/null
@@ -1,24 +0,0 @@
-/*************************************************
-* File EntropySource Header File *
-* (C) 1999-2007 The Botan Project *
-*************************************************/
-
-#ifndef BOTAN_ENTROPY_SRC_FILE_H__
-#define BOTAN_ENTROPY_SRC_FILE_H__
-
-#include <botan/base.h>
-
-namespace Botan {
-
-/*************************************************
-* File Based Entropy Source *
-*************************************************/
-class File_EntropySource : public EntropySource
- {
- public:
- u32bit slow_poll(byte[], u32bit);
- };
-
-}
-
-#endif
diff --git a/include/idea.h b/include/idea.h
index 6f6932c38..10b0f7049 100644
--- a/include/idea.h
+++ b/include/idea.h
@@ -24,7 +24,6 @@ class IDEA : public BlockCipher
void enc(const byte[], byte[]) const;
void dec(const byte[], byte[]) const;
void key(const byte[], u32bit);
- static u16bit mul_inv(u16bit);
SecureBuffer<u16bit, 52> EK, DK;
};
diff --git a/include/init.h b/include/init.h
index 9936b8c6f..5a9181c8d 100644
--- a/include/init.h
+++ b/include/init.h
@@ -24,8 +24,6 @@ class InitializerOptions
bool fips_mode() const;
bool self_test() const;
- std::string config_file() const;
-
InitializerOptions(const std::string&);
private:
std::map<std::string, std::string> args;
diff --git a/include/libstate.h b/include/libstate.h
index dcd6f26a5..666677ff3 100644
--- a/include/libstate.h
+++ b/include/libstate.h
@@ -8,6 +8,7 @@
#include <botan/base.h>
#include <botan/enums.h>
+#include <botan/init.h>
#include <botan/ui.h>
#include <string>
#include <vector>
@@ -21,6 +22,15 @@ namespace Botan {
class Library_State
{
public:
+ Library_State();
+ ~Library_State();
+
+ void initialize(const InitializerOptions&, Modules&);
+
+ void load(Modules&);
+
+ void add_engine(class Engine*);
+
class Engine_Iterator
{
public:
@@ -52,15 +62,11 @@ class Library_State
void add_entropy(EntropySource&, bool);
u32bit seed_prng(bool, u32bit);
- void load(class Modules&);
-
void set_timer(class Timer*);
u64bit system_clock() const;
class Config& config() const;
- void add_engine(class Engine*);
-
class Mutex* get_mutex() const;
class Mutex* get_named_mutex(const std::string&);
@@ -73,9 +79,6 @@ class Library_State
void set_transcoder(class Charset_Transcoder*);
std::string transcode(const std::string,
Character_Set, Character_Set) const;
-
- Library_State(class Mutex_Factory*);
- ~Library_State();
private:
Library_State(const Library_State&) {}
Library_State& operator=(const Library_State&) { return (*this); }
@@ -84,7 +87,7 @@ class Library_State
class Mutex_Factory* mutex_factory;
class Timer* timer;
- class Config* config_obj;
+ mutable class Config* config_obj;
class X509_GlobalState* x509_state_obj;
std::map<std::string, class Mutex*> locks;
diff --git a/include/parsing.h b/include/parsing.h
index ce36365fe..dcfde9568 100644
--- a/include/parsing.h
+++ b/include/parsing.h
@@ -27,6 +27,12 @@ u32bit parse_expr(const std::string&);
std::string to_string(u64bit, u32bit = 0);
u32bit to_u32bit(const std::string&);
+/*************************************************
+* String/Network Address Conversions *
+*************************************************/
+u32bit string_to_ipv4(const std::string&);
+std::string ipv4_to_string(u32bit);
+
}
#endif
diff --git a/include/x509self.h b/include/x509self.h
index 30acbdbaa..eb9628a0b 100644
--- a/include/x509self.h
+++ b/include/x509self.h
@@ -26,7 +26,7 @@ class X509_Cert_Options
std::string state;
std::string serial_number;
- std::string email, uri, dns, xmpp;
+ std::string email, uri, dns, ip, xmpp;
std::string challenge;