diff options
Diffstat (limited to 'src/lib/prov/openssl/openssl.h')
-rw-r--r-- | src/lib/prov/openssl/openssl.h | 33 |
1 files changed, 27 insertions, 6 deletions
diff --git a/src/lib/prov/openssl/openssl.h b/src/lib/prov/openssl/openssl.h index 58a7d77dc..8b2b41c1d 100644 --- a/src/lib/prov/openssl/openssl.h +++ b/src/lib/prov/openssl/openssl.h @@ -1,12 +1,12 @@ /* * Utils for calling OpenSSL -* (C) 2015 Jack Lloyd +* (C) 2015,2016 Jack Lloyd * * Botan is released under the Simplified BSD License (see license.txt) */ -#ifndef BOTAN_OPENSSL_H__ -#define BOTAN_OPENSSL_H__ +#ifndef BOTAN_INTERNAL_OPENSSL_H__ +#define BOTAN_INTERNAL_OPENSSL_H__ #include <botan/internal/pk_ops.h> #include <botan/secmem.h> @@ -15,9 +15,18 @@ #include <string> #include <openssl/err.h> +#include <openssl/evp.h> + +#if defined(BOTAN_HAS_RC4) +#include <openssl/rc4.h> +#endif namespace Botan { +class BlockCipher; +class StreamCipher; +class HashFunction; + class OpenSSL_Error : public Exception { public: @@ -25,9 +34,15 @@ class OpenSSL_Error : public Exception Exception(what + " failed: " + ERR_error_string(ERR_get_error(), nullptr)) {} }; -#define BOTAN_OPENSSL_BLOCK_PRIO 150 -#define BOTAN_OPENSSL_HASH_PRIO 150 -#define BOTAN_OPENSSL_RC4_PRIO 150 +/* Block Ciphers */ + +std::unique_ptr<BlockCipher> +make_openssl_block_cipher(const std::string& name); + +/* Hash */ + +std::unique_ptr<HashFunction> +make_openssl_hash(const std::string& name); /* RSA */ @@ -73,6 +88,12 @@ make_openssl_ecdh_ka_op(const ECDH_PrivateKey& key, const std::string& params); #endif +#if defined(BOTAN_HAS_RC4) + +std::unique_ptr<StreamCipher> +make_openssl_rc4(size_t skip); + +#endif } |