]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
libgnutls: Compile if SRP is disabled.
authorSimon Josefsson <simon@josefsson.org>
Wed, 7 May 2008 13:39:13 +0000 (15:39 +0200)
committerSimon Josefsson <simon@josefsson.org>
Wed, 7 May 2008 13:39:13 +0000 (15:39 +0200)
Report and tiny patches from <jared.jennings.ctr@eglin.af.mil>, see
<https://savannah.gnu.org/support/index.php?106342>.

NEWS
doc/examples/ex-session-info.c
guile/src/core.c
guile/tests/Makefile.am

diff --git a/NEWS b/NEWS
index 4c15fb8486492460577c195b11e5e02bfca4f639..62136ee148a51fd33a091052a897f61e2676b123 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,10 @@ See the end for copying conditions.
 
 * Version 2.3.9 (unreleased)
 
+** libgnutls: Compile if SRP is disabled.
+Report and tiny patches from <jared.jennings.ctr@eglin.af.mil>, see
+<https://savannah.gnu.org/support/index.php?106342>.
+
 ** libgnutls: Translation fixes.
 
 ** guile: Fix -fgnu89-inline test.
index dded2751526958ba66b0f296ea6175d13536edcf..e7856da4a8e3c4f394b2092e17a09dcdc830a190 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright 2007 Free Software Foundation
+/* Copyright 2007, 2008 Free Software Foundation
  *
  * Copying and distribution of this file, with or without modification,
  * are permitted in any medium without royalty provided the copyright
@@ -43,10 +43,12 @@ print_info (gnutls_session_t session)
       break;
 
 
+#ifdef ENABLE_SRP
     case GNUTLS_CRD_SRP:
       printf ("- SRP session with username %s\n",
              gnutls_srp_server_get_username (session));
       break;
+#endif
 
     case GNUTLS_CRD_PSK:
       if (gnutls_psk_server_get_username (session) != NULL)
index ca544d4a6bd7aec1f3ea89b47e9541ad60b4337f..fdaca363f95afaa4f690194dd33a7a97f2534ea8 100644 (file)
@@ -578,6 +578,7 @@ SCM_DEFINE (scm_gnutls_set_session_credentials_x, "set-session-credentials!",
                                                           FUNC_NAME);
       err = gnutls_credentials_set (c_session, GNUTLS_CRD_ANON, c_cred);
     }
+#ifdef ENABLE_SRP
   else if (SCM_SMOB_PREDICATE (scm_tc16_gnutls_srp_client_credentials,
                               cred))
     {
@@ -596,6 +597,7 @@ SCM_DEFINE (scm_gnutls_set_session_credentials_x, "set-session-credentials!",
                                                     FUNC_NAME);
       err = gnutls_credentials_set (c_session, GNUTLS_CRD_SRP, c_cred);
     }
+#endif
   else if (SCM_SMOB_PREDICATE (scm_tc16_gnutls_psk_client_credentials,
                               cred))
     {
@@ -1751,6 +1753,7 @@ SCM_DEFINE (scm_gnutls_peer_certificate_status, "peer-certificate-status",
 \f
 /* SRP credentials.  */
 
+#ifdef ENABLE_SRP
 SCM_DEFINE (scm_gnutls_make_srp_server_credentials,
            "make-srp-server-credentials",
            0, 0, 0,
@@ -1990,6 +1993,7 @@ SCM_DEFINE (scm_gnutls_srp_base64_decode, "srp-base64-decode",
   return (scm_from_locale_string (c_result));
 }
 #undef FUNC_NAME
+#endif /* ENABLE_SRP */
 
 \f
 /* PSK credentials.  */
index b0109217f41048c58a34b7307174601eb169dbe8..d3fd435ebef2ea6ccea179221f18692935001115 100644 (file)
@@ -1,5 +1,5 @@
 #  GNUTLS -- Guile bindings for GnuTLS.
-#  Copyright (C) 2007  Free Software Foundation
+#  Copyright (C) 2007, 2008  Free Software Foundation
 #
 #  GNUTLS is free software; you can redistribute it and/or
 #  modify it under the terms of the GNU Lesser General Public
 TESTS = anonymous-auth.scm session-record-port.scm             \
         pkcs-import-export.scm                                 \
        openpgp-keys.scm openpgp-keyring.scm openpgp-auth.scm   \
-        srp-base64.scm errors.scm                              \
+        errors.scm                                             \
        x509-certificates.scm x509-auth.scm
 
+if ENABLE_SRP
+TESTS += srp-base64.scm
+endif
+
 TESTS_ENVIRONMENT = $(top_builddir)/guile/pre-inst-guile -L $(srcdir)