summaryrefslogtreecommitdiff
path: root/libextra/gnutls_extra.c
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2002-11-19 13:07:21 +0000
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2002-11-19 13:07:21 +0000
commitb58a168e293155fe11deada650d28fb6ac865781 (patch)
treed4653c8fa152da2edcc5bf1d655552ecddc76f01 /libextra/gnutls_extra.c
parentfe1b1d18fa42e2162cc58da5bcc262d07dfb9b9b (diff)
downloadgnutls-b58a168e293155fe11deada650d28fb6ac865781.tar.gz
Added support for the DSS certificate SRP authenticated cipher suites (currently only with 3DES cipher). Cleaned up the client and server code, which was duplicated.
Diffstat (limited to 'libextra/gnutls_extra.c')
-rw-r--r--libextra/gnutls_extra.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/libextra/gnutls_extra.c b/libextra/gnutls_extra.c
index 608266ac32..8f557b083c 100644
--- a/libextra/gnutls_extra.c
+++ b/libextra/gnutls_extra.c
@@ -58,6 +58,7 @@ extern const int _gnutls_kx_algorithms_size;
extern gnutls_kx_algo_entry _gnutls_kx_algorithms[];
extern MOD_AUTH_STRUCT srp_auth_struct;
extern MOD_AUTH_STRUCT srp_rsa_auth_struct;
+extern MOD_AUTH_STRUCT srp_dss_auth_struct;
static int _gnutls_add_srp_auth_struct(void) {
int i;
@@ -71,9 +72,7 @@ int i;
_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+1].name = 0;
-
}
i++;
@@ -81,6 +80,14 @@ int i;
_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+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+1].name = 0;