]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
Compilation fixes when pkcs11 is not enabled.
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Tue, 20 Sep 2011 16:56:59 +0000 (18:56 +0200)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Tue, 20 Sep 2011 16:56:59 +0000 (18:56 +0200)
configure.ac
lib/gnutls_privkey.c
lib/pkcs11.c
src/cli.c

index ac644e287c930259adf2774413c011e1f0b16d0e..a2a99a95a13c7854030a3acdf16d194907418d57 100644 (file)
@@ -123,7 +123,6 @@ dnl Check for p11-kit
 AC_ARG_WITH(p11-kit,
        AS_HELP_STRING([--without-p11-kit],
                [Build without p11-kit and PKCS#11 support]))
-AM_CONDITIONAL(ENABLE_PKCS11, test "$with_p11_kit" != "no")
 if test "$with_p11_kit" != "no"; then
        PKG_CHECK_MODULES(P11_KIT, [p11-kit-1 >= 0.4], [with_p11_kit=yes], [with_p11_kit=no])
        if test "$with_p11_kit" != "no";then
@@ -144,6 +143,8 @@ if test "$with_p11_kit" != "no"; then
        fi
 fi
 
+AM_CONDITIONAL(ENABLE_PKCS11, test "$with_p11_kit" != "no")
+
 dnl Check for libcfg+
 SAVED_LIBS=$LIBS
 AC_ARG_WITH(included-libcfg,
index b8a3ee01ae2132bb3cefd229e97bcaefc792800d..87ed1c17fec6bcfdd55d00e387f3fbe34a5fb69d 100644 (file)
@@ -295,6 +295,8 @@ gnutls_privkey_deinit (gnutls_privkey_t key)
       case GNUTLS_PRIVKEY_X509:
         gnutls_x509_privkey_deinit (key->key.x509);
         break;
+      default:
+        break;
       }
   gnutls_free (key);
 }
index 89bda0c1acbf21b677a087cb061dc8e4480b6908..4f4c07125f7016579df4248f0b0d99c13694fb8f 100644 (file)
@@ -29,6 +29,8 @@
 #include <string.h>
 #include <gnutls_errors.h>
 #include <gnutls_datum.h>
+
+
 #include <pkcs11_int.h>
 #include <p11-kit/p11-kit.h>
 #include <p11-kit/pin.h>
index 74912a5f5aabe299709e04e10412fc8e0d453564..ae665c256bd7383aafd7f9d0afa8ff6bee2e2f4b 100644 (file)
--- a/src/cli.c
+++ b/src/cli.c
@@ -169,7 +169,9 @@ load_keys (void)
   int ret, i;
   gnutls_datum_t data = { NULL, 0 };
   gnutls_x509_crt_t crt_list[MAX_CRT];
+#ifdef ENABLE_PKCS11
   gnutls_pkcs11_privkey_t pkcs11_key;
+#endif
   gnutls_x509_privkey_t tmp_key;
   uint8_t keyid[GNUTLS_OPENPGP_KEYID_SIZE];