]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
SRP ciphersuites were moved to the gnutls (lgpl) library.
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Wed, 28 Jul 2004 10:28:48 +0000 (10:28 +0000)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Wed, 28 Jul 2004 10:28:48 +0000 (10:28 +0000)
20 files changed:
NEWS
includes/gnutls/extra.h
lib/Makefile.am
lib/auth_srp.c [moved from libextra/auth_srp.c with 96% similarity]
lib/auth_srp.h [moved from libextra/auth_srp.h with 100% similarity]
lib/auth_srp_passwd.c [moved from libextra/auth_srp_passwd.c with 90% similarity]
lib/auth_srp_passwd.h [moved from libextra/auth_srp_passwd.h with 100% similarity]
lib/auth_srp_rsa.c [moved from libextra/auth_srp_rsa.c with 83% similarity]
lib/auth_srp_sb64.c [moved from libextra/auth_srp_sb64.c with 92% similarity]
lib/ext_srp.c [moved from libextra/ext_srp.c with 79% similarity]
lib/ext_srp.h [moved from libextra/ext_srp.h with 100% similarity]
lib/gnutls.h.in.in
lib/gnutls_algorithms.c
lib/gnutls_extensions.c
lib/gnutls_srp.c [moved from libextra/gnutls_srp.c with 95% similarity]
lib/gnutls_srp.h [moved from libextra/gnutls_srp.h with 100% similarity]
libextra/Makefile.am
libextra/gnutls_extra.c
libgcrypt.m4
opencdk.m4

diff --git a/NEWS b/NEWS
index 90e28bd1384e9b2d5f783badd7d4bbd827e48da7..1960ff64e0cd233066b89f916528fe293f1531b1 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,7 @@ Version 1.1.12
   latest (yet unreleased) draft. Unfortunately this breaks
   compatibility with previous versions.
 - Changed the makefiles to be more portable.
+- SRP ciphersuites were moved to the gnutls library.
 
 Version 1.1.11 (16/07/2004)
 - Added the '_t' suffix to all exported symbols.
index fb3900874a6c2aa6c4d0908a2c562e68d88c8c43..b948becc7db36c7087a2b007456ad82eac89ea00 100644 (file)
 
 #define LIBGNUTLS_EXTRA_VERSION LIBGNUTLS_VERSION
 
-/* SRP */
-
-typedef struct DSTRUCT* gnutls_srp_server_credentials_t;
-typedef struct DSTRUCT* gnutls_srp_client_credentials_t;
-
-void gnutls_srp_free_client_credentials( gnutls_srp_client_credentials_t sc);
-int gnutls_srp_allocate_client_credentials( gnutls_srp_client_credentials_t *sc);
-int gnutls_srp_set_client_credentials( gnutls_srp_client_credentials_t res, char *username, char* password);
-
-void gnutls_srp_free_server_credentials( gnutls_srp_server_credentials_t sc);
-int gnutls_srp_allocate_server_credentials( gnutls_srp_server_credentials_t *sc);
-int gnutls_srp_set_server_credentials_file( gnutls_srp_server_credentials_t res, 
-    const char *password_file, const char* password_conf_file);
-
-const char* gnutls_srp_server_get_username( gnutls_session_t state);
-
-int gnutls_srp_verifier( const char* username, const char* password, const gnutls_datum_t *salt, 
-    const gnutls_datum_t* g, const gnutls_datum_t* n, 
-    gnutls_datum_t * res);
-
-/* The static parameters defined in draft-ietf-tls-srp-05
- * Those should be used as input to gnutls_srp_verifier().
- */
-extern const gnutls_datum_t gnutls_srp_2048_group_prime;
-extern const gnutls_datum_t gnutls_srp_2048_group_generator;
-
-extern const gnutls_datum_t gnutls_srp_1536_group_prime;
-extern const gnutls_datum_t gnutls_srp_1536_group_generator;
-
-extern const gnutls_datum_t gnutls_srp_1024_group_prime;
-extern const gnutls_datum_t gnutls_srp_1024_group_generator;
-
-typedef int gnutls_srp_server_credentials_function(
-    gnutls_session_t, 
-    const char* username, gnutls_datum_t* salt, 
-    gnutls_datum_t* verifier, gnutls_datum_t* generator,
-    gnutls_datum_t* prime
-);
-void gnutls_srp_set_server_credentials_function( 
-    gnutls_srp_server_credentials_t, 
-    gnutls_srp_server_credentials_function *);
-
-typedef int gnutls_srp_client_credentials_function(gnutls_session_t, unsigned int,
-    char **, char**);
-void gnutls_srp_set_client_credentials_function( gnutls_srp_client_credentials_t, 
-    gnutls_srp_client_credentials_function *);
-
-
 /* Openpgp certificate stuff 
  */
 
index f4dbe60d71d4a035e7eebf7c693fbb1bcc075e5a..9882ceb83249c1e12a59f595b1ce7d9aa7181093 100644 (file)
@@ -35,7 +35,8 @@ EXTRA_DIST = debug.h gnutls_compress.h defines.h gnutls.asn pkix.asn \
        gnutls_sig.h gnutls_mem.h gnutls_ui.h \
        io_debug.h ext_max_record.h gnutls_session_pack.h \
        gnutls_alert.h gnutls_str.h gnutls_state.h gnutls_x509.h \
-       ext_cert_type.h gnutls_rsa_export.h ext_server_name.h auth_dh_common.h
+       ext_cert_type.h gnutls_rsa_export.h ext_server_name.h auth_dh_common.h \
+       ext_srp.h gnutls_srp.h auth_srp.h auth_srp_passwd.h 
 lib_LTLIBRARIES = libgnutls.la
 
 X509_COBJECTS = x509/crl.c x509/dn.c x509/common.c x509/x509.c x509/extensions.c \
@@ -44,6 +45,9 @@ X509_COBJECTS = x509/crl.c x509/dn.c x509/common.c x509/x509.c x509/extensions.c
        x509/privkey_pkcs8.c x509/pkcs12.c x509/pkcs12_bag.c x509/pkcs12_encr.c \
        x509/x509_write.c x509/crl_write.c x509/compat.c
 
+SRP_COBJECTS = ext_srp.c gnutls_srp.c auth_srp.c auth_srp_passwd.c \
+       auth_srp_sb64.c auth_srp_rsa.c
+
 COBJECTS = gnutls_record.c gnutls_compress.c debug.c \
        gnutls_cipher.c gnutls_buffers.c gnutls_handshake.c gnutls_num.c \
        gnutls_errors.c gnutls_algorithms.c gnutls_dh.c gnutls_kx.c \
@@ -63,7 +67,7 @@ COBJECTS = gnutls_record.c gnutls_compress.c debug.c \
 
 # Separate so we can create the documentation
 
-libgnutls_la_SOURCES = $(COBJECTS) $(X509_COBJECTS) $(MINITASN1_COBJECTS)
+libgnutls_la_SOURCES = $(COBJECTS) $(X509_COBJECTS) $(MINITASN1_COBJECTS) $(SRP_COBJECTS)
 
 libgnutls_la_LDFLAGS = $(LIBTASN1_LIBS) $(LIBGCRYPT_LIBS) \
        $(libgnutls_version_script_cmd) \
similarity index 96%
rename from libextra/auth_srp.c
rename to lib/auth_srp.c
index 1ede38fefc09587cb53c0987b40d7734d3cff54a..671ec20fa0ca3600973dc262033c628109023520 100644 (file)
@@ -4,22 +4,23 @@
  *
  * This file is part of GNUTLS.
  *
- * GNUTLS-EXTRA is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+ *  The GNUTLS library is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public   
+ *  License as published by the Free Software Foundation; either 
+ *  version 2.1 of the License, or (at your option) any later version.
  *
- * GNUTLS-EXTRA is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
+ *  This library is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of 
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this library; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
  *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
  */
 
-#include "gnutls_int.h"
+#include <gnutls_int.h>
 
 #ifdef ENABLE_SRP
 
similarity index 100%
rename from libextra/auth_srp.h
rename to lib/auth_srp.h
similarity index 90%
rename from libextra/auth_srp_passwd.c
rename to lib/auth_srp_passwd.c
index 26021c581b55dec5d046ed8fa7d3cc3b4efd3071..56af4f0d8523424c4eff1dc3899b8debd3ab0dd0 100644 (file)
@@ -1,33 +1,34 @@
 /*
- * Copyright (C) 2001,2003 Nikos Mavroyanopoulos
+ * Copyright (C) 2001,2002,2003 Nikos Mavroyanopoulos
  * Copyright (C) 2004 Free Software Foundation
  *
  * This file is part of GNUTLS.
  *
- * GNUTLS-EXTRA is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+ *  The GNUTLS library is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public   
+ *  License as published by the Free Software Foundation; either 
+ *  version 2.1 of the License, or (at your option) any later version.
  *
- * GNUTLS-EXTRA is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
+ *  This library is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of 
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this library; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
  *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
  */
 
 /* Functions for operating in an SRP passwd file are included here */
 
-#include "gnutls_int.h"
+#include <gnutls_int.h>
 
 #ifdef ENABLE_SRP
 
 #include "x509_b64.h"
 #include "gnutls_errors.h"
-#include "auth_srp_passwd.h"
+#include <auth_srp_passwd.h>
 #include "auth_srp.h"
 #include "gnutls_auth_int.h"
 #include "gnutls_srp.h"
similarity index 83%
rename from libextra/auth_srp_rsa.c
rename to lib/auth_srp_rsa.c
index 5bccdb268e55876d10689a0e02dd988e0ef482d8..00f853060c79221f34605267649e4d866c8c5695 100644 (file)
@@ -4,22 +4,23 @@
  *
  * This file is part of GNUTLS.
  *
- * GNUTLS-EXTRA is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+ *  The GNUTLS library is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public   
+ *  License as published by the Free Software Foundation; either 
+ *  version 2.1 of the License, or (at your option) any later version.
  *
- * GNUTLS-EXTRA is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
+ *  This library is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of 
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this library; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
  *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
  */
 
-#include "gnutls_int.h"
+#include <gnutls_int.h>
 
 #ifdef ENABLE_SRP
 
similarity index 92%
rename from libextra/auth_srp_sb64.c
rename to lib/auth_srp_sb64.c
index 975ebf5ca199b28397e8d84993511beb57450730..c446508fe63b189299a39c605d3fb85d15324c52 100644 (file)
@@ -1,22 +1,23 @@
 /*
- * Copyright (C) 2001,2002 Nikos Mavroyanopoulos <nmav@hellug.gr>
+ * Copyright (C) 2001,2002,2003 Nikos Mavroyanopoulos
  * Copyright (C) 2004 Free Software Foundation
  *
  * This file is part of GNUTLS.
  *
- * GNUTLS-EXTRA is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+ *  The GNUTLS library is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public   
+ *  License as published by the Free Software Foundation; either 
+ *  version 2.1 of the License, or (at your option) any later version.
  *
- * GNUTLS-EXTRA is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
+ *  This library is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of 
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this library; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
  *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
  */
 
 #include <gnutls_int.h>
similarity index 79%
rename from libextra/ext_srp.c
rename to lib/ext_srp.c
index 990c810847a501246623516d7628b49fd4fdd4ef..8bb1cbc7de6daa344194ecd141e159e7508e589e 100644 (file)
@@ -1,25 +1,26 @@
 /*
- * Copyright (C) 2001,2002 Nikos Mavroyanopoulos
+ * Copyright (C) 2001,2002,2003 Nikos Mavroyanopoulos
  * Copyright (C) 2004 Free Software Foundation
  *
  * This file is part of GNUTLS.
  *
- * GNUTLS-EXTRA is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+ *  The GNUTLS library is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public   
+ *  License as published by the Free Software Foundation; either 
+ *  version 2.1 of the License, or (at your option) any later version.
  *
- * GNUTLS-EXTRA is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
+ *  This library is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of 
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this library; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
  *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
  */
 
-#include "gnutls_int.h"
+#include <gnutls_int.h>
 #include <ext_srp.h>
 
 #ifdef ENABLE_SRP
similarity index 100%
rename from libextra/ext_srp.h
rename to lib/ext_srp.h
index 26b6b7bb0177de9bd5b701909e6c3e7201080a17..a39134541391bf4be4667e756ee64e0666b6ea1a 100644 (file)
@@ -497,3 +497,52 @@ void gnutls_openpgp_send_key(gnutls_session_t session, gnutls_openpgp_key_status
 int gnutls_fingerprint(gnutls_digest_algorithm_t algo, const gnutls_datum_t* data, 
     void* result, size_t* result_size);
 
+
+/* SRP 
+ */
+
+typedef struct DSTRUCT* gnutls_srp_server_credentials_t;
+typedef struct DSTRUCT* gnutls_srp_client_credentials_t;
+
+void gnutls_srp_free_client_credentials( gnutls_srp_client_credentials_t sc);
+int gnutls_srp_allocate_client_credentials( gnutls_srp_client_credentials_t *sc);
+int gnutls_srp_set_client_credentials( gnutls_srp_client_credentials_t res, char *username, char* password);
+
+void gnutls_srp_free_server_credentials( gnutls_srp_server_credentials_t sc);
+int gnutls_srp_allocate_server_credentials( gnutls_srp_server_credentials_t *sc);
+int gnutls_srp_set_server_credentials_file( gnutls_srp_server_credentials_t res, 
+    const char *password_file, const char* password_conf_file);
+
+const char* gnutls_srp_server_get_username( gnutls_session_t state);
+
+int gnutls_srp_verifier( const char* username, const char* password, const gnutls_datum_t *salt, 
+    const gnutls_datum_t* g, const gnutls_datum_t* n, 
+    gnutls_datum_t * res);
+
+/* The static parameters defined in draft-ietf-tls-srp-05
+ * Those should be used as input to gnutls_srp_verifier().
+ */
+extern const gnutls_datum_t gnutls_srp_2048_group_prime;
+extern const gnutls_datum_t gnutls_srp_2048_group_generator;
+
+extern const gnutls_datum_t gnutls_srp_1536_group_prime;
+extern const gnutls_datum_t gnutls_srp_1536_group_generator;
+
+extern const gnutls_datum_t gnutls_srp_1024_group_prime;
+extern const gnutls_datum_t gnutls_srp_1024_group_generator;
+
+typedef int gnutls_srp_server_credentials_function(
+    gnutls_session_t, 
+    const char* username, gnutls_datum_t* salt, 
+    gnutls_datum_t* verifier, gnutls_datum_t* generator,
+    gnutls_datum_t* prime
+);
+void gnutls_srp_set_server_credentials_function( 
+    gnutls_srp_server_credentials_t, 
+    gnutls_srp_server_credentials_function *);
+
+typedef int gnutls_srp_client_credentials_function(gnutls_session_t, unsigned int,
+    char **, char**);
+void gnutls_srp_set_client_credentials_function( gnutls_srp_client_credentials_t, 
+    gnutls_srp_client_credentials_function *);
+
index e0ee6000db35e7b093f5de910132829a4c05b5a4..2c8d181ce7128ed9383e9d7e6fb164f0aef3bacb 100644 (file)
@@ -217,6 +217,9 @@ extern mod_auth_st rsa_export_auth_struct;
 extern mod_auth_st dhe_rsa_auth_struct;
 extern mod_auth_st dhe_dss_auth_struct;
 extern mod_auth_st anon_auth_struct;
+extern mod_auth_st srp_auth_struct;
+extern mod_auth_st srp_rsa_auth_struct;
+extern mod_auth_st srp_dss_auth_struct;
 
 
 #define MAX_KX_ALGOS 10
@@ -230,6 +233,10 @@ gnutls_kx_algo_entry _gnutls_kx_algorithms[MAX_KX_ALGOS] = {
     {"RSA EXPORT", GNUTLS_KX_RSA_EXPORT, &rsa_export_auth_struct, 0, 1},
     {"DHE RSA", GNUTLS_KX_DHE_RSA, &dhe_rsa_auth_struct, 1, 0},
     {"DHE DSS", GNUTLS_KX_DHE_DSS, &dhe_dss_auth_struct, 1, 0},
+
+    {"SRP DSS", GNUTLS_KX_SRP_DSS, &srp_dss_auth_struct, 0, 0},
+    {"SRP RSA", GNUTLS_KX_SRP_RSA, &srp_rsa_auth_struct, 0, 0},
+    {"SRP", GNUTLS_KX_SRP, &srp_auth_struct, 0, 0},
     /* other algorithms are appended here by gnutls-extra
      * initialization function.
      */
index adfd109552af04bd597caa4444b38fb58eefbbed..ee1cf1e86c9e8954e5c2a4133bab1bd9dd2390f9 100644 (file)
@@ -31,7 +31,8 @@
 #include "ext_max_record.h"
 #include <ext_cert_type.h>
 #include <ext_server_name.h>
-#include "gnutls_num.h"
+#include <ext_srp.h>
+#include <gnutls_num.h>
 
 /* Key Exchange Section */
 #define GNUTLS_EXTENSION_ENTRY(type, ext_func_recv, ext_func_send) \
@@ -51,6 +52,9 @@ gnutls_extension_entry _gnutls_extensions[MAX_EXT_SIZE] = {
     GNUTLS_EXTENSION_ENTRY(GNUTLS_EXTENSION_SERVER_NAME,
                           _gnutls_server_name_recv_params,
                           _gnutls_server_name_send_params),
+    GNUTLS_EXTENSION_ENTRY(GNUTLS_EXTENSION_SRP,
+                          _gnutls_srp_recv_params,
+                          _gnutls_srp_send_params),
     {0, 0, 0, 0}
 };
 
similarity index 95%
rename from libextra/gnutls_srp.c
rename to lib/gnutls_srp.c
index 3442bd102085bfc8b1084853578cda1155974b0d..e1374f4bac3eb0069a12de369d04bdc694c7d3be 100644 (file)
@@ -1,22 +1,23 @@
 /*
- * Copyright (C) 2001,2003 Nikos Mavroyanopoulos
+ * Copyright (C) 2001,2002,2003 Nikos Mavroyanopoulos
  * Copyright (C) 2004 Free Software Foundation
  *
  * This file is part of GNUTLS.
  *
- * GNUTLS-EXTRA is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+ *  The GNUTLS library is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public   
+ *  License as published by the Free Software Foundation; either 
+ *  version 2.1 of the License, or (at your option) any later version.
  *
- * GNUTLS-EXTRA is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
+ *  This library is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of 
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this library; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
  *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
  */
 
 #include <gnutls_int.h>
similarity index 100%
rename from libextra/gnutls_srp.h
rename to lib/gnutls_srp.h
index 43786c9f8683ec6fef05b7b2669a347416f1500a..3d524d80dc69fde586177c21b8aaf0b781c9107a 100644 (file)
@@ -12,9 +12,8 @@ else
   libgnutls_extra_version_script_cmd =
 endif
 
-EXTRA_DIST = ext_srp.h gnutls_srp.h libgnutls-extra.vers \
-       auth_srp.h auth_srp_passwd.h openssl_compat.h \
-       gnutls-extra-api.tex gnutls_extra.h libgnutls-extra-config.in \
+EXTRA_DIST = libgnutls-extra.vers \
+       openssl_compat.h gnutls-extra-api.tex gnutls_extra.h libgnutls-extra-config.in \
        libgnutls-extra.m4 lzoconf.h minilzo.h
 
 
@@ -62,9 +61,8 @@ LZO_OBJECTS =
 endif
 
 
-COBJECTS_EXTRA = ext_srp.c \
-       gnutls_srp.c auth_srp.c auth_srp_passwd.c auth_srp_sb64.c \
-       gnutls_extra.c auth_srp_rsa.c
+COBJECTS_EXTRA = \
+       gnutls_extra.c
 
 
 libgnutls_extra_la_LDFLAGS = $(libgnutls_extra_version_script_cmd) \
index 4c44e91e4c90c16eda7122465e9ddc8e77a260e4..a842ebe4e74d355d94b9de8f58212fd849aabe25 100644 (file)
@@ -22,7 +22,6 @@
 #include <gnutls_int.h>
 #include <gnutls_errors.h>
 #include <gnutls_extensions.h>
-#include <ext_srp.h>
 #include <gnutls_openpgp.h>
 #include <gnutls_extra.h>
 #include <gnutls_algorithms.h>
 # include <minilzo.h>
 #endif
 
-extern gnutls_extension_entry _gnutls_extensions[];
-extern const int _gnutls_extensions_size;
-
-extern const int _gnutls_kx_algorithms_size;
-extern gnutls_kx_algo_entry _gnutls_kx_algorithms[];
-
-#define TOSTR(x) #x
-
-#ifdef ENABLE_SRP
-static int _gnutls_add_srp_extension(void)
-{
-    int i;
-
-    /* find the last element */
-    for (i = 0; i < _gnutls_extensions_size; i++) {
-       if (_gnutls_extensions[i].name == NULL)
-           break;
-    }
-
-    if (_gnutls_extensions[i].name == NULL
-       && (i < _gnutls_extensions_size - 1)) {
-       _gnutls_extensions[i].name = TOSTR(GNUTLS_EXTENSION_SRP);
-       _gnutls_extensions[i].type = GNUTLS_EXTENSION_SRP;
-       _gnutls_extensions[i].gnutls_ext_func_recv =
-           _gnutls_srp_recv_params;
-       _gnutls_extensions[i].gnutls_ext_func_send =
-           _gnutls_srp_send_params;
-
-       _gnutls_extensions[i + 1].name = 0;
-
-       return 0;               /* ok */
-    }
-
-    return GNUTLS_E_MEMORY_ERROR;
-}
-
-extern mod_auth_st srp_auth_struct;
-extern mod_auth_st srp_rsa_auth_struct;
-extern mod_auth_st srp_dss_auth_struct;
-
-
-static int _gnutls_add_srp_auth_struct(void)
-{
-    int i;
-
-    /* find the last element */
-    for (i = 0; i < _gnutls_kx_algorithms_size; i++) {
-       if (_gnutls_kx_algorithms[i].name == NULL)
-           break;
-    }
-
-    if (_gnutls_kx_algorithms[i].name == NULL
-       && (i < _gnutls_kx_algorithms_size - 1)) {
-       _gnutls_kx_algorithms[i].name = "SRP";
-       _gnutls_kx_algorithms[i].algorithm = GNUTLS_KX_SRP;
-       _gnutls_kx_algorithms[i].auth_struct = &srp_auth_struct;
-       _gnutls_kx_algorithms[i].needs_dh_params = 0;
-       _gnutls_kx_algorithms[i].needs_rsa_params = 0;
-       _gnutls_kx_algorithms[i + 1].name = 0;
-    }
-    i++;
-
-    if (_gnutls_kx_algorithms[i].name == NULL
-       && (i < _gnutls_kx_algorithms_size - 1)) {
-       _gnutls_kx_algorithms[i].name = "SRP RSA";
-       _gnutls_kx_algorithms[i].algorithm = GNUTLS_KX_SRP_RSA;
-       _gnutls_kx_algorithms[i].auth_struct = &srp_rsa_auth_struct;
-       _gnutls_kx_algorithms[i].needs_dh_params = 0;
-       _gnutls_kx_algorithms[i].needs_rsa_params = 0;
-       _gnutls_kx_algorithms[i + 1].name = 0;
-    }
-    i++;
-
-    if (_gnutls_kx_algorithms[i].name == NULL
-       && (i < _gnutls_kx_algorithms_size - 1)) {
-       _gnutls_kx_algorithms[i].name = "SRP DSS";
-       _gnutls_kx_algorithms[i].algorithm = GNUTLS_KX_SRP_DSS;
-       _gnutls_kx_algorithms[i].auth_struct = &srp_dss_auth_struct;
-       _gnutls_kx_algorithms[i].needs_dh_params = 0;
-       _gnutls_kx_algorithms[i].needs_rsa_params = 0;
-       _gnutls_kx_algorithms[i + 1].name = 0;
-
-       return 0;               /* ok */
-    }
-
-    return GNUTLS_E_MEMORY_ERROR;
-}
-
-#endif
-
 
 /* the number of the compression algorithms available in the compression
  * structure.
@@ -252,25 +161,6 @@ int gnutls_global_init_extra(void)
     }
 #endif
 
-#ifdef ENABLE_SRP
-    /* Add the SRP authentication to the list of authentication
-     * methods.
-     */
-    ret = _gnutls_add_srp_auth_struct();
-    if (ret < 0) {
-       gnutls_assert();
-       return ret;
-    }
-
-    /* Do the same of the extension
-     */
-    ret = _gnutls_add_srp_extension();
-    if (ret < 0) {
-       gnutls_assert();
-       return ret;
-    }
-#endif
-
     /* Register the openpgp functions. This is because some
      * of them are defined to be NULL in the main library.
      */
index e5f2a43c064dc4d2ce7673923d2d674e20f69652..20bd105561c4388fd384afdecf62c9713d98a625 100644 (file)
@@ -20,7 +20,7 @@ dnl version of libgcrypt is at least 1.2.5 *and* the API number is 1.  Using
 dnl this features allows to prevent build against newer versions of libgcrypt
 dnl with a changed API.
 dnl
-AC_DEFUN(AM_PATH_LIBGCRYPT,
+AC_DEFUN([AM_PATH_LIBGCRYPT],
 [ AC_ARG_WITH(libgcrypt-prefix,
             AC_HELP_STRING([--with-libgcrypt-prefix=PFX],
                            [prefix where LIBGCRYPT is installed (optional)]),
index ca51e8075a7195e672558ce1d7a45582c8fcb50c..1957e512250af14909850b2ab871b1fbc40bdd4d 100644 (file)
@@ -10,7 +10,7 @@ dnl $id$
 dnl AM_PATH_LIBOPENCDK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]])
 dnl Test for libopencdk, and define CDK_CFLAGS and CDK_LIBS
 dnl
-AC_DEFUN(AM_PATH_LIBOPENCDK,
+AC_DEFUN([AM_PATH_LIBOPENCDK],
 [dnl
 dnl Get the cflags and libraries from the opencdk-config script
 dnl