diff options
author | Simon Josefsson <simon@josefsson.org> | 2005-11-15 12:49:47 +0000 |
---|---|---|
committer | Simon Josefsson <simon@josefsson.org> | 2005-11-15 12:49:47 +0000 |
commit | 7a05253969c17facad2e4a9999eed3ab33044c61 (patch) | |
tree | 878bcbe4f5349e9c2bf1898cd15a1622a4886bfb /src | |
parent | 95d2f681a90df0e72439577721a2b9437211b3ee (diff) | |
download | gnutls-7a05253969c17facad2e4a9999eed3ab33044c61.tar.gz |
Disable more SRP stuff if --disable-srp, tiny patch from Albert Chin <gnutls-dev@mlists.thewrittenword.com> and tiny patch to src/prime.c from RedHat gnutls-1.2.6 RPM.
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile.am | 7 | ||||
-rw-r--r-- | src/prime.c | 6 |
2 files changed, 11 insertions, 2 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index 1aa64cb87d..3e55101488 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -24,17 +24,22 @@ SUBDIRS = srp x509 openpgp cfg INCLUDES = -I$(top_srcdir)/lib -I../includes -I$(top_srcdir)/includes \ -I$(top_srcdir)/gl -I$(srcdir)/cfg -bin_PROGRAMS = gnutls-serv gnutls-cli psktool srptool gnutls-cli-debug certtool +bin_PROGRAMS = gnutls-serv gnutls-cli psktool gnutls-cli-debug certtool +if ENABLE_SRP +bin_PROGRAMS += srptool +endif gnutls_serv_SOURCES = serv.gaa serv-gaa.h serv-gaa.c list.h serv.c \ common.h common.c gnutls_serv_LDADD = ../lib/libgnutls.la ../libextra/libgnutls-extra.la \ $(LIBGCRYPT_LIBS) $(LIBTASN1_LIBS) $(LIBOPENCDK_LIBS) +if ENABLE_SRP srptool_SOURCES = crypt.gaa crypt-gaa.h crypt-gaa.c crypt.c srptool_LDADD = ../lib/libgnutls.la ../libextra/libgnutls-extra.la \ $(LIBGCRYPT_LIBS) $(LIBTASN1_LIBS) $(LIBOPENCDK_LIBS) \ ../gl/libgnu.la +endif psktool_SOURCES = psk.gaa psk-gaa.h psk-gaa.c psk.c psktool_LDADD = ../lib/libgnutls.la ../libextra/libgnutls-extra.la \ diff --git a/src/prime.c b/src/prime.c index 844b851465..9f93cc61b9 100644 --- a/src/prime.c +++ b/src/prime.c @@ -74,7 +74,8 @@ generate_prime (int bits, int how) } else { - if (bits <= 1024) +#ifdef ENABLE_SRP + if (bits <= 1024) { p = gnutls_srp_1024_group_prime; g = gnutls_srp_1024_group_generator; @@ -97,6 +98,9 @@ generate_prime (int bits, int how) gnutls_strerror (ret)); exit (1); } +#else + fprintf(stderr, "Parameters unavailable as SRP disabled.\n"); +#endif } if (cparams) |