summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2002-05-17 09:28:47 +0000
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2002-05-17 09:28:47 +0000
commit27c54ef60b171c2bee3cbeddd3f8d8ce4eaaaf9a (patch)
tree15fb3c3a1717cc5418b8226243f791cd44ddb989
parent2fff04cf8061b27e10072a3f8cbdac6895839364 (diff)
downloadgnutls-27c54ef60b171c2bee3cbeddd3f8d8ce4eaaaf9a.tar.gz
Added --modules option to libgnutls-config. This option prints the extra modules that have been enabled into the library.
-rw-r--r--README20
-rw-r--r--configure.in6
-rw-r--r--lib/auth_anon.c2
-rw-r--r--lib/auth_dhe.c4
-rw-r--r--lib/auth_rsa.c2
-rw-r--r--lib/auth_srp.c2
-rwxr-xr-xlib/libgnutls-config.in10
-rw-r--r--src/prime.c7
8 files changed, 44 insertions, 9 deletions
diff --git a/README b/README
index d2b5701d03..2111a2d98c 100644
--- a/README
+++ b/README
@@ -13,8 +13,14 @@ real world programs)
LICENSE ISSUES:
-COPYING.LIB (GNU Lesser GPL) applies to the whole gnutls library
-except for the SRP and OPENPGP parts, which are under the GPL.
+The latest release of the gnutls library is covered under the GNU Lesser
+GPL License, unlike previously released versions which were licensed under
+the GPL.
+
+The LGPL license (found in COPYING.LIB) applies to all parts of the gnutls
+library except for the "OPENPGP authentication" part, and the "SRP
+authentication" part, which stay GPL (see the COPYING file). Both of these
+parts can be disabled at compile time.
In order to create a library under the LGPL run the configure script with
the following parameters:
@@ -25,6 +31,16 @@ or the library will be under the GPL. In both cases the libraries are
binary compatible. In the LGPL case the functions are replaced with
stubs that always fail.
+The rationale behind this license change is that given the fact that other
+free libraries with similar functionality exist, keeping the gnutls library
+GPL would not give any practical advantage to Free software developers.
+
+Please note that in many cases it is better for a library to be licensed
+under the GPL, so that it provides an advantage for free software projects.
+The Lesser GPL is so named because it does less to protect the freedom of
+the users of the code that it covers.
+See http://www.gnu.org/philosophy/why-not-lgpl.html for more explanation.
+
BUGS:
diff --git a/configure.in b/configure.in
index 852a1d0811..8c61d1f15e 100644
--- a/configure.in
+++ b/configure.in
@@ -252,6 +252,7 @@ AC_ARG_ENABLE( srp-authentication, [ --disable-srp-authentication disable t
if test x$ac_enable_srp != xno; then
AC_MSG_RESULT(no)
AC_DEFINE(ENABLE_SRP)
+ LIBGNUTLS_MODULES="$LIBGNUTLS_MODULES srp-authentication"
else
AC_MSG_RESULT(yes)
fi
@@ -263,6 +264,7 @@ AC_ARG_ENABLE( anon-authentication, [ --disable-anon-authentication disable
if test x$ac_enable_anon != xno; then
AC_MSG_RESULT(no)
AC_DEFINE(ENABLE_ANON)
+ LIBGNUTLS_MODULES="$LIBGNUTLS_MODULES anonymous-authentication"
else
AC_MSG_RESULT(yes)
fi
@@ -274,7 +276,8 @@ AC_ARG_ENABLE( openpgp-authentication, [ --disable-openpgp-authentication disab
)
if test x$ac_enable_openpgp != xno; then
AC_MSG_RESULT(no)
- AM_PATH_LIBOPENCDK( 0.1.0, AC_DEFINE(HAVE_LIBOPENCDK),
+ AM_PATH_LIBOPENCDK( 0.1.0, AC_DEFINE(HAVE_LIBOPENCDK)
+ LIBGNUTLS_MODULES="$LIBGNUTLS_MODULES openpgp-authentication",
AC_MSG_WARN([[
***
*** libopencdk was not found. You will not be able to use OpenPGP keys with gnutls.
@@ -296,6 +299,7 @@ LIBGNUTLS_LIBS="$LIBS -L${libdir} -lgnutls $LIBGCRYPT_LIBS $LIBOPENCDK_LIBS"
LIBGNUTLS_CFLAGS="$LIBGCRYPT_CFLAGS $LIBOPENCDK_CFLAGS -I${includedir}"
AC_SUBST(LIBGNUTLS_LIBS)
AC_SUBST(LIBGNUTLS_CFLAGS)
+AC_SUBST(LIBGNUTLS_MODULES)
if test $ac_cv_c_compiler_gnu != no; then
diff --git a/lib/auth_anon.c b/lib/auth_anon.c
index 375ee44e9c..b5e042eff0 100644
--- a/lib/auth_anon.c
+++ b/lib/auth_anon.c
@@ -35,7 +35,7 @@ int gen_anon_client_kx( GNUTLS_STATE, opaque**);
int proc_anon_server_kx( GNUTLS_STATE, opaque*, int);
int proc_anon_client_kx( GNUTLS_STATE, opaque*, int);
-MOD_AUTH_STRUCT anon_auth_struct = {
+const MOD_AUTH_STRUCT anon_auth_struct = {
"ANON",
NULL,
NULL,
diff --git a/lib/auth_dhe.c b/lib/auth_dhe.c
index f279fd2e4b..fd0d31ca5d 100644
--- a/lib/auth_dhe.c
+++ b/lib/auth_dhe.c
@@ -36,7 +36,7 @@ static int gen_dhe_client_kx(GNUTLS_STATE, opaque **);
static int proc_dhe_server_kx(GNUTLS_STATE, opaque *, int);
static int proc_dhe_client_kx(GNUTLS_STATE, opaque *, int);
-MOD_AUTH_STRUCT dhe_rsa_auth_struct = {
+const MOD_AUTH_STRUCT dhe_rsa_auth_struct = {
"DHE_RSA",
_gnutls_gen_cert_server_certificate,
_gnutls_gen_cert_client_certificate,
@@ -57,7 +57,7 @@ MOD_AUTH_STRUCT dhe_rsa_auth_struct = {
_gnutls_proc_cert_cert_req /* proc server cert request */
};
-MOD_AUTH_STRUCT dhe_dss_auth_struct = {
+const MOD_AUTH_STRUCT dhe_dss_auth_struct = {
"DHE_DSS",
_gnutls_gen_cert_server_certificate,
_gnutls_gen_cert_client_certificate,
diff --git a/lib/auth_rsa.c b/lib/auth_rsa.c
index 01145fc889..84438af15d 100644
--- a/lib/auth_rsa.c
+++ b/lib/auth_rsa.c
@@ -41,7 +41,7 @@ int gen_rsa_client_kx(GNUTLS_STATE, opaque **);
int proc_rsa_client_kx(GNUTLS_STATE, opaque *, int);
-MOD_AUTH_STRUCT rsa_auth_struct = {
+const MOD_AUTH_STRUCT rsa_auth_struct = {
"RSA",
_gnutls_gen_cert_server_certificate,
_gnutls_gen_cert_client_certificate,
diff --git a/lib/auth_srp.c b/lib/auth_srp.c
index e794c16b29..45f0295335 100644
--- a/lib/auth_srp.c
+++ b/lib/auth_srp.c
@@ -38,7 +38,7 @@ int gen_srp_client_kx0(GNUTLS_STATE, opaque **);
int proc_srp_server_kx2(GNUTLS_STATE, opaque *, int);
int proc_srp_client_kx0(GNUTLS_STATE, opaque *, int);
-MOD_AUTH_STRUCT srp_auth_struct = {
+const MOD_AUTH_STRUCT srp_auth_struct = {
"SRP",
NULL,
NULL,
diff --git a/lib/libgnutls-config.in b/lib/libgnutls-config.in
index c0f83ed2e7..b83682bcb3 100755
--- a/lib/libgnutls-config.in
+++ b/lib/libgnutls-config.in
@@ -6,7 +6,7 @@ exec_prefix_set=no
gnutls_libs="@LIBGNUTLS_LIBS@"
gnutls_cflags="@LIBGNUTLS_CFLAGS@"
-
+gnutls_modules="@LIBGNUTLS_MODULES@"
usage()
{
@@ -18,6 +18,7 @@ Options:
[--version]
[--libs]
[--cflags]
+ [--modules]
EOF
exit $1
}
@@ -59,6 +60,9 @@ while test $# -gt 0; do
--libs)
echo_libs=yes
;;
+ --modules)
+ echo_modules=yes
+ ;;
*)
usage 1 1>&2
;;
@@ -90,4 +94,8 @@ if test "$echo_libs" = "yes"; then
echo ${gnutls_libs}
fi
+if test "$echo_modules" = "yes"; then
+ echo ${gnutls_modules}
+fi
+
diff --git a/src/prime.c b/src/prime.c
index 7232174885..d09a027693 100644
--- a/src/prime.c
+++ b/src/prime.c
@@ -44,7 +44,12 @@ int main(int argc, char **argv)
fprintf(stderr, "Error in the arguments.\n");
return -1;
}
+
+ gnutls_global_init();
+ fprintf(stderr, "Generating prime...");
+// gcry_control (GCRYCTL_SET_VERBOSITY, (int)0);
+
/* this is an emulation of Michael Wiener's table
* bad emulation.
*/
@@ -93,5 +98,7 @@ int main(int argc, char **argv)
printf("\n};\n");
free(tmp);
+ gnutls_global_deinit();
+
return 0;
}