From: Simon Josefsson Date: Wed, 7 May 2008 13:39:13 +0000 (+0200) Subject: libgnutls: Compile if SRP is disabled. X-Git-Tag: gnutls_2_3_9~20 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e91acdf32910381cbd4fd8908c0625a187488bae;p=thirdparty%2Fgnutls.git libgnutls: Compile if SRP is disabled. Report and tiny patches from , see . --- diff --git a/NEWS b/NEWS index 4c15fb8486..62136ee148 100644 --- 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 , see +. + ** libgnutls: Translation fixes. ** guile: Fix -fgnu89-inline test. diff --git a/doc/examples/ex-session-info.c b/doc/examples/ex-session-info.c index dded275152..e7856da4a8 100644 --- a/doc/examples/ex-session-info.c +++ b/doc/examples/ex-session-info.c @@ -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) diff --git a/guile/src/core.c b/guile/src/core.c index ca544d4a6b..fdaca363f9 100644 --- a/guile/src/core.c +++ b/guile/src/core.c @@ -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", /* 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 */ /* PSK credentials. */ diff --git a/guile/tests/Makefile.am b/guile/tests/Makefile.am index b0109217f4..d3fd435ebe 100644 --- a/guile/tests/Makefile.am +++ b/guile/tests/Makefile.am @@ -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 @@ -18,9 +18,13 @@ 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)