summaryrefslogtreecommitdiff
path: root/guile
diff options
context:
space:
mode:
authorSimon Josefsson <simon@josefsson.org>2008-05-07 15:39:13 +0200
committerSimon Josefsson <simon@josefsson.org>2008-05-07 15:39:13 +0200
commite91acdf32910381cbd4fd8908c0625a187488bae (patch)
tree6a848eaa75ce473b5a51364e5207a128600a7d88 /guile
parent13c6c88d456cf6d67e99fa041ddf5418a84ab76a (diff)
downloadgnutls-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>.
Diffstat (limited to 'guile')
-rw-r--r--guile/src/core.c4
-rw-r--r--guile/tests/Makefile.am8
2 files changed, 10 insertions, 2 deletions
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)