diff options
author | Simon Josefsson <simon@josefsson.org> | 2008-05-07 15:39:13 +0200 |
---|---|---|
committer | Simon Josefsson <simon@josefsson.org> | 2008-05-07 15:39:13 +0200 |
commit | e91acdf32910381cbd4fd8908c0625a187488bae (patch) | |
tree | 6a848eaa75ce473b5a51364e5207a128600a7d88 | |
parent | 13c6c88d456cf6d67e99fa041ddf5418a84ab76a (diff) | |
download | gnutls-e91acdf32910381cbd4fd8908c0625a187488bae.tar.gz |
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>.
-rw-r--r-- | NEWS | 4 | ||||
-rw-r--r-- | doc/examples/ex-session-info.c | 4 | ||||
-rw-r--r-- | guile/src/core.c | 4 | ||||
-rw-r--r-- | guile/tests/Makefile.am | 8 |
4 files changed, 17 insertions, 3 deletions
@@ -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. 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) |