aboutsummaryrefslogtreecommitdiffstats
path: root/community/softhsm/74b06622cdcf4b104349f5803adca9443dce3abb.patch
diff options
context:
space:
mode:
Diffstat (limited to 'community/softhsm/74b06622cdcf4b104349f5803adca9443dce3abb.patch')
-rw-r--r--community/softhsm/74b06622cdcf4b104349f5803adca9443dce3abb.patch89
1 files changed, 89 insertions, 0 deletions
diff --git a/community/softhsm/74b06622cdcf4b104349f5803adca9443dce3abb.patch b/community/softhsm/74b06622cdcf4b104349f5803adca9443dce3abb.patch
new file mode 100644
index 0000000000..96c44de498
--- /dev/null
+++ b/community/softhsm/74b06622cdcf4b104349f5803adca9443dce3abb.patch
@@ -0,0 +1,89 @@
+From e69657101cb219820d7d94d2df4e08815f83d28b Mon Sep 17 00:00:00 2001
+From: Peter Wu <peter@lekensteyn.nl>
+Date: Wed, 12 Dec 2018 21:47:23 +0100
+Subject: [PATCH] Issue #435: Fix botan build without EDDSA
+
+Loading libsofthsm2.so (built on Ubuntu 14.04 with botan) failed with:
+
+ ERROR: Could not load the PKCS#11 library/module: src/lib/libsofthsm2.so: undefined symbol: _ZN17BotanEDPrivateKeyD1Ev
+
+Fixes #435 (a regression in 2.5.0 due to commit 2751555).
+---
+ src/lib/crypto/BotanEDKeyPair.cpp | 2 ++
+ src/lib/crypto/BotanEDKeyPair.h | 2 ++
+ src/lib/crypto/BotanEDPrivateKey.h | 2 ++
+ src/lib/crypto/BotanEDPublicKey.h | 2 ++
+ 4 files changed, 8 insertions(+)
+
+diff --git a/src/lib/crypto/BotanEDKeyPair.cpp b/src/lib/crypto/BotanEDKeyPair.cpp
+index 3be3fa5e..3e967e55 100644
+--- a/src/lib/crypto/BotanEDKeyPair.cpp
++++ b/src/lib/crypto/BotanEDKeyPair.cpp
+@@ -31,6 +31,7 @@
+ *****************************************************************************/
+
+ #include "config.h"
++#ifdef WITH_EDDSA
+ #include "log.h"
+ #include "BotanEDKeyPair.h"
+
+@@ -67,3 +68,4 @@ const PrivateKey* BotanEDKeyPair::getConstPrivateKey() const
+ {
+ return &privKey;
+ }
++#endif
+diff --git a/src/lib/crypto/BotanEDKeyPair.h b/src/lib/crypto/BotanEDKeyPair.h
+index 02d6a4c5..4f2cffee 100644
+--- a/src/lib/crypto/BotanEDKeyPair.h
++++ b/src/lib/crypto/BotanEDKeyPair.h
+@@ -34,6 +34,7 @@
+ #define _SOFTHSM_V2_BOTANEDKEYPAIR_H
+
+ #include "config.h"
++#ifdef WITH_EDDSA
+ #include "AsymmetricKeyPair.h"
+ #include "BotanEDPublicKey.h"
+ #include "BotanEDPrivateKey.h"
+@@ -62,5 +63,6 @@ class BotanEDKeyPair : public AsymmetricKeyPair
+ // The private key
+ BotanEDPrivateKey privKey;
+ };
++#endif
+ #endif // !_SOFTHSM_V2_BOTANEDKEYPAIR_H
+
+diff --git a/src/lib/crypto/BotanEDPrivateKey.h b/src/lib/crypto/BotanEDPrivateKey.h
+index d71f6c07..ac236bb8 100644
+--- a/src/lib/crypto/BotanEDPrivateKey.h
++++ b/src/lib/crypto/BotanEDPrivateKey.h
+@@ -34,6 +34,7 @@
+ #define _SOFTHSM_V2_BOTANEDPRIVATEKEY_H
+
+ #include "config.h"
++#ifdef WITH_EDDSA
+ #include "EDPrivateKey.h"
+ #include <botan/pk_keys.h>
+
+@@ -82,4 +83,5 @@ class BotanEDPrivateKey : public EDPrivateKey
+ // Create the Botan representation of the key
+ void createBotanKey();
+ };
++#endif
+ #endif // !_SOFTHSM_V2_BOTANEDPRIVATEKEY_H
+diff --git a/src/lib/crypto/BotanEDPublicKey.h b/src/lib/crypto/BotanEDPublicKey.h
+index fce34a5f..15e6d458 100644
+--- a/src/lib/crypto/BotanEDPublicKey.h
++++ b/src/lib/crypto/BotanEDPublicKey.h
+@@ -34,6 +34,7 @@
+ #define _SOFTHSM_V2_BOTANEDPUBLICKEY_H
+
+ #include "config.h"
++#ifdef WITH_EDDSA
+ #include "EDPublicKey.h"
+ #include <botan/pk_keys.h>
+
+@@ -74,4 +75,5 @@ class BotanEDPublicKey : public EDPublicKey
+ // Create the Botan representation of the key
+ void createBotanKey();
+ };
++#endif
+ #endif // !_SOFTHSM_V2_BOTANEDPUBLICKEY_H