]> the.earth.li Git - onak.git/commitdiff
Fix compilation without libnettle
authorJonathan McDowell <noodles@earth.li>
Sun, 13 Sep 2020 10:21:09 +0000 (11:21 +0100)
committerJonathan McDowell <noodles@earth.li>
Sun, 13 Sep 2020 10:45:14 +0000 (11:45 +0100)
The RSA signature routines are unavailable when we don't have nettle.

rsa.c

diff --git a/rsa.c b/rsa.c
index ceb81e1eada3ecaf24d7669a848a0f183659929a..7da095b1c8dde3e210368ffe9afda0369be9413e 100644 (file)
--- a/rsa.c
+++ b/rsa.c
  * this program.  If not, see <https://www.gnu.org/licenses/>.
  */
 
+#include "build-config.h"
+
 #include <string.h>
 
+#ifdef HAVE_NETTLE
 #include <nettle/ripemd160.h>
 #include <nettle/rsa.h>
 #include <nettle/sha.h>
@@ -77,3 +80,4 @@ int rsa_sha384_verify_digest(const struct rsa_public_key *key,
 
        return rsa_pkcs1_verify(key, sizeof(buf), buf, s);
 }
+#endif /* HAVE_NETTLE */