aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lib/vendor/openssl/info.txt4
-rw-r--r--src/lib/vendor/openssl/openssl.h28
-rw-r--r--src/lib/vendor/openssl/openssl_ecdsa.cpp15
-rw-r--r--src/lib/vendor/openssl/openssl_rsa.cpp9
4 files changed, 35 insertions, 21 deletions
diff --git a/src/lib/vendor/openssl/info.txt b/src/lib/vendor/openssl/info.txt
index a1faac3e3..0ca78a88e 100644
--- a/src/lib/vendor/openssl/info.txt
+++ b/src/lib/vendor/openssl/info.txt
@@ -1,5 +1,9 @@
load_on vendor
+<header:internal>
+openssl.h
+</header:internal>
+
<libs>
all -> crypto
</libs>
diff --git a/src/lib/vendor/openssl/openssl.h b/src/lib/vendor/openssl/openssl.h
new file mode 100644
index 000000000..1ffaed519
--- /dev/null
+++ b/src/lib/vendor/openssl/openssl.h
@@ -0,0 +1,28 @@
+/*
+* Utils for calling OpenSSL
+* (C) 2015 Jack Lloyd
+*
+* Botan is released under the Simplified BSD License (see license.txt)
+*/
+
+#ifndef BOTAN_CALL_OPENSSL_H__
+#define BOTAN_CALL_OPENSSL_H__
+
+#include <botan/secmem.h>
+#include <botan/exceptn.h>
+#include <memory>
+
+#include <openssl/err.h>
+
+namespace Botan {
+
+class OpenSSL_Error : public Exception
+ {
+ public:
+ OpenSSL_Error(const std::string& what) :
+ Exception(what + " failed: " + ERR_error_string(ERR_get_error(), nullptr)) {}
+ };
+
+}
+
+#endif
diff --git a/src/lib/vendor/openssl/openssl_ecdsa.cpp b/src/lib/vendor/openssl/openssl_ecdsa.cpp
index 9016986da..9031944d4 100644
--- a/src/lib/vendor/openssl/openssl_ecdsa.cpp
+++ b/src/lib/vendor/openssl/openssl_ecdsa.cpp
@@ -5,13 +5,8 @@
* Botan is released under the Simplified BSD License (see license.txt)
*/
-#include <botan/build.h>
-#include <botan/internal/pk_utils.h>
-#include <functional>
-#include <memory>
-
+#include <botan/internal/openssl.h>
#include <openssl/x509.h>
-#include <openssl/err.h>
#if defined(BOTAN_HAS_ECDSA) && !defined(OPENSSL_NO_ECDSA)
@@ -19,6 +14,7 @@
#include <botan/ecdsa.h>
#include <botan/pkcs8.h>
#include <botan/oids.h>
+#include <botan/internal/pk_utils.h>
#include <openssl/ecdsa.h>
#include <openssl/ec.h>
@@ -47,13 +43,6 @@ secure_vector<byte> PKCS8_for_openssl(const EC_PrivateKey& ec)
.get_contents();
}
-class OpenSSL_Error : public Exception
- {
- public:
- OpenSSL_Error(const std::string& what) :
- Exception(what + " failed: " + ERR_error_string(ERR_get_error(), nullptr)) {}
- };
-
int OpenSSL_EC_nid_for(const OID& oid)
{
if(oid.empty())
diff --git a/src/lib/vendor/openssl/openssl_rsa.cpp b/src/lib/vendor/openssl/openssl_rsa.cpp
index ef86bf91a..ad2e47683 100644
--- a/src/lib/vendor/openssl/openssl_rsa.cpp
+++ b/src/lib/vendor/openssl/openssl_rsa.cpp
@@ -5,7 +5,7 @@
* Botan is released under the Simplified BSD License (see license.txt)
*/
-#include <botan/build.h>
+#include <botan/internal/openssl.h>
#if defined(BOTAN_HAS_RSA)
@@ -34,13 +34,6 @@ std::pair<int, size_t> get_openssl_enc_pad(const std::string& eme)
throw Lookup_Error("OpenSSL RSA does not support EME " + eme);
}
-class OpenSSL_Error : public Exception
- {
- public:
- OpenSSL_Error(const std::string& what) :
- Exception(what + " failed: " + ERR_error_string(ERR_get_error(), nullptr)) {}
- };
-
class OpenSSL_RSA_Encryption_Operation : public PK_Ops::Encryption
{
public: