diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2003-10-02 15:02:31 +0000 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2003-10-02 15:02:31 +0000 |
commit | 2ce3818a2591e2bd914469f0eb6cd86e276f6adb (patch) | |
tree | 0c72220264a82c7643be8a4fdbe1ab8efcaa0dd8 | |
parent | 0e3312c33f6405bba2ff54ec4108e1eea5e09842 (diff) | |
download | gnutls-2ce3818a2591e2bd914469f0eb6cd86e276f6adb.tar.gz |
Rolled back some of Arne's changes. Now the ciphers can be set in the client/server.gnutls_0_9_8
-rw-r--r-- | src/cli.c | 12 | ||||
-rw-r--r-- | src/common.h | 4 | ||||
-rw-r--r-- | src/serv.c | 12 |
3 files changed, 16 insertions, 12 deletions
@@ -78,20 +78,20 @@ static gnutls_srp_client_credentials srp_cred; static gnutls_anon_client_credentials anon_cred; static gnutls_certificate_credentials xcred; -static const int protocol_priority[] = { GNUTLS_TLS1, GNUTLS_SSL3, 0 }; -static const int kx_priority[] = +int protocol_priority[PRI_MAX] = { GNUTLS_TLS1, GNUTLS_SSL3, 0 }; +int kx_priority[PRI_MAX] = { GNUTLS_KX_RSA, GNUTLS_KX_DHE_DSS, GNUTLS_KX_DHE_RSA, GNUTLS_KX_SRP, /* Do not use anonymous authentication, unless you know what that means */ GNUTLS_KX_ANON_DH, GNUTLS_KX_RSA_EXPORT, 0 }; -static const int cipher_priority[] = +int cipher_priority[PRI_MAX] = { GNUTLS_CIPHER_ARCFOUR_128, GNUTLS_CIPHER_AES_128_CBC, GNUTLS_CIPHER_3DES_CBC, GNUTLS_CIPHER_ARCFOUR_40, 0 }; -static const int comp_priority[] = { GNUTLS_COMP_ZLIB, GNUTLS_COMP_NULL, 0 }; -static const int mac_priority[] = { GNUTLS_MAC_SHA, GNUTLS_MAC_MD5, 0 }; -static const int cert_type_priority[] = { GNUTLS_CRT_X509, GNUTLS_CRT_OPENPGP, 0 }; +int comp_priority[PRI_MAX] = { GNUTLS_COMP_ZLIB, GNUTLS_COMP_NULL, 0 }; +int mac_priority[PRI_MAX] = { GNUTLS_MAC_SHA, GNUTLS_MAC_MD5, 0 }; +int cert_type_priority[PRI_MAX] = { GNUTLS_CRT_X509, GNUTLS_CRT_OPENPGP, 0 }; /* end of global stuff */ diff --git a/src/common.h b/src/common.h index 956cb7dc37..594b33ea9e 100644 --- a/src/common.h +++ b/src/common.h @@ -3,6 +3,10 @@ #include <gnutls/gnutls.h> +/* the number of elements in the priority structures. + */ +#define PRI_MAX 16 + int print_info( gnutls_session state, const char* hostname); void print_cert_info( gnutls_session state, const char* hostname); void print_list(void); diff --git a/src/serv.c b/src/serv.c index 578de0bb66..74a3a2bb59 100644 --- a/src/serv.c +++ b/src/serv.c @@ -245,21 +245,21 @@ static int generate_rsa_params(void) return 0; } -static const int protocol_priority[] = { GNUTLS_TLS1, GNUTLS_SSL3, 0 }; -static const int kx_priority[] = +int protocol_priority[PRI_MAX] = { GNUTLS_TLS1, GNUTLS_SSL3, 0 }; +int kx_priority[PRI_MAX] = { GNUTLS_KX_DHE_DSS, GNUTLS_KX_RSA, GNUTLS_KX_DHE_RSA, GNUTLS_KX_SRP, /* Do not use anonymous authentication, unless you know what that means */ GNUTLS_KX_ANON_DH, GNUTLS_KX_RSA_EXPORT, 0 }; -static const int cipher_priority[] = +int cipher_priority[PRI_MAX] = { GNUTLS_CIPHER_AES_128_CBC, GNUTLS_CIPHER_3DES_CBC, GNUTLS_CIPHER_ARCFOUR_128, GNUTLS_CIPHER_ARCFOUR_40, 0 }; -static const int comp_priority[] = +int comp_priority[PRI_MAX] = { GNUTLS_COMP_ZLIB, GNUTLS_COMP_LZO, GNUTLS_COMP_NULL, 0 }; -static const int mac_priority[] = { GNUTLS_MAC_SHA, GNUTLS_MAC_MD5, 0 }; -static const int cert_type_priority[] = { GNUTLS_CRT_X509, GNUTLS_CRT_OPENPGP, 0 }; +int mac_priority[PRI_MAX] = { GNUTLS_MAC_SHA, GNUTLS_MAC_MD5, 0 }; +int cert_type_priority[PRI_MAX] = { GNUTLS_CRT_X509, GNUTLS_CRT_OPENPGP, 0 }; LIST_DECLARE_INIT(listener_list, listener_item, listener_free); |