From: Nikos Mavrogiannopoulos Date: Tue, 20 Sep 2011 16:56:59 +0000 (+0200) Subject: Compilation fixes when pkcs11 is not enabled. X-Git-Tag: gnutls_3_0_4~91 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=521230b3fb19090d66ddd43700ce9d7ee2b496e9;p=thirdparty%2Fgnutls.git Compilation fixes when pkcs11 is not enabled. --- diff --git a/configure.ac b/configure.ac index ac644e287c..a2a99a95a1 100644 --- a/configure.ac +++ b/configure.ac @@ -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, diff --git a/lib/gnutls_privkey.c b/lib/gnutls_privkey.c index b8a3ee01ae..87ed1c17fe 100644 --- a/lib/gnutls_privkey.c +++ b/lib/gnutls_privkey.c @@ -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); } diff --git a/lib/pkcs11.c b/lib/pkcs11.c index 89bda0c1ac..4f4c07125f 100644 --- a/lib/pkcs11.c +++ b/lib/pkcs11.c @@ -29,6 +29,8 @@ #include #include #include + + #include #include #include diff --git a/src/cli.c b/src/cli.c index 74912a5f5a..ae665c256b 100644 --- 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];