summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2005-01-21 08:46:19 +0000
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2005-01-21 08:46:19 +0000
commit4cd13ed6913afac69263655e3dfc8beb4119c101 (patch)
tree51714b07f654b2a221f18a24b4fdf5e8708c4307
parent3c43f5b39dfc543637595b62cbbd64c3b0f377a9 (diff)
downloadgnutls-4cd13ed6913afac69263655e3dfc8beb4119c101.tar.gz
changed the values of GNUTLS_PK_UNKNOWN and GNUTLS_SIGN_UNKNOWN to zero.
-rw-r--r--lib/auth_cert.c7
-rw-r--r--lib/gnutls.h.in.in8
-rw-r--r--lib/gnutls_handshake.c6
-rw-r--r--lib/gnutls_int.h9
4 files changed, 12 insertions, 18 deletions
diff --git a/lib/auth_cert.c b/lib/auth_cert.c
index ea634b701a..8901e2dd8a 100644
--- a/lib/auth_cert.c
+++ b/lib/auth_cert.c
@@ -1538,7 +1538,7 @@ void _gnutls_selected_certs_set(gnutls_session_t session,
*
*/
int _gnutls_server_select_cert(gnutls_session_t session,
- gnutls_pk_algorithm_t requested_algo)
+ gnutls_pk_algorithm_t requested_algo)
{
uint i;
int index, ret;
@@ -1582,9 +1582,8 @@ int _gnutls_server_select_cert(gnutls_session_t session,
*/
if (index >= 0 && ret == 0) {
_gnutls_selected_certs_set(session,
- &cred->cert_list[index][0],
- cred->cert_list_length[index],
- &cred->pkey[index], 0);
+ &cred->cert_list[index][0], cred->cert_list_length[index],
+ &cred->pkey[index], 0);
}
return ret;
diff --git a/lib/gnutls.h.in.in b/lib/gnutls.h.in.in
index 47206f7e12..c77cbf71d6 100644
--- a/lib/gnutls.h.in.in
+++ b/lib/gnutls.h.in.in
@@ -159,15 +159,13 @@ typedef enum { GNUTLS_CRT_X509=1, GNUTLS_CRT_OPENPGP
typedef enum { GNUTLS_X509_FMT_DER,
GNUTLS_X509_FMT_PEM } gnutls_x509_crt_fmt_t;
-typedef enum { GNUTLS_PK_RSA = 1, GNUTLS_PK_DSA,
- GNUTLS_PK_UNKNOWN = 0xff
+typedef enum { GNUTLS_PK_UNKNOWN=0, GNUTLS_PK_RSA = 1, GNUTLS_PK_DSA
} gnutls_pk_algorithm_t;
const char *gnutls_pk_algorithm_get_name( gnutls_pk_algorithm_t algorithm);
-typedef enum { GNUTLS_SIGN_RSA_SHA = 1, GNUTLS_SIGN_DSA_SHA,
- GNUTLS_SIGN_RSA_MD5, GNUTLS_SIGN_RSA_MD2, GNUTLS_SIGN_RSA_RMD160,
- GNUTLS_SIGN_UNKNOWN = 0xff
+typedef enum { GNUTLS_SIGN_UNKNOWN=0, GNUTLS_SIGN_RSA_SHA = 1, GNUTLS_SIGN_DSA_SHA,
+ GNUTLS_SIGN_RSA_MD5, GNUTLS_SIGN_RSA_MD2, GNUTLS_SIGN_RSA_RMD160
} gnutls_sign_algorithm_t;
const char *gnutls_sign_algorithm_get_name( gnutls_sign_algorithm_t algorithm);
diff --git a/lib/gnutls_handshake.c b/lib/gnutls_handshake.c
index 267c802148..472f46f8d3 100644
--- a/lib/gnutls_handshake.c
+++ b/lib/gnutls_handshake.c
@@ -2462,10 +2462,8 @@ inline static int check_server_params(gnutls_session_t session,
* by checking certificates etc.
*/
int _gnutls_remove_unwanted_ciphersuites(gnutls_session_t session,
- cipher_suite_st **
- cipherSuites, int numCipherSuites,
- gnutls_pk_algorithm_t
- requested_pk_algo)
+ cipher_suite_st **cipherSuites, int numCipherSuites,
+ gnutls_pk_algorithm_t requested_pk_algo)
{
int ret = 0;
diff --git a/lib/gnutls_int.h b/lib/gnutls_int.h
index 8f4baf64ae..f119febf52 100644
--- a/lib/gnutls_int.h
+++ b/lib/gnutls_int.h
@@ -236,17 +236,16 @@ typedef enum gnutls_x509_crt_fmt {
} gnutls_x509_crt_fmt_t;
typedef enum gnutls_pk_algorithm {
- GNUTLS_PK_RSA = 1, GNUTLS_PK_DSA,
- GNUTLS_PK_UNKNOWN = 0xff
+ GNUTLS_PK_UNKNOWN = 0, GNUTLS_PK_RSA = 1, GNUTLS_PK_DSA
} gnutls_pk_algorithm_t;
#define GNUTLS_PK_ANY (gnutls_pk_algorithm_t)-1
-#define GNUTLS_PK_NONE (gnutls_pk_algorithm_t)0
+#define GNUTLS_PK_NONE (gnutls_pk_algorithm_t)-2
typedef enum gnutls_sign_algorithm {
+ GNUTLS_SIGN_UNKNOWN = 0,
GNUTLS_SIGN_RSA_SHA = 1, GNUTLS_SIGN_DSA_SHA,
- GNUTLS_SIGN_RSA_MD5, GNUTLS_SIGN_RSA_MD2, GNUTLS_SIGN_RSA_RMD160,
- GNUTLS_SIGN_UNKNOWN = 0xff
+ GNUTLS_SIGN_RSA_MD5, GNUTLS_SIGN_RSA_MD2, GNUTLS_SIGN_RSA_RMD160
} gnutls_sign_algorithm_t;
/* STATE (stop) */