summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Josefsson <simon@josefsson.org>2007-04-11 13:32:22 +0000
committerSimon Josefsson <simon@josefsson.org>2007-04-11 13:32:22 +0000
commite62a2cf1b92dbdc7d955dbb194e7973c5c10a0fe (patch)
treebc44c63f2f97017a19c9318b414f5fe2d97ad6f6
parentffc24930fd939c6c6115eb2ba01d5f4b17b87c0c (diff)
downloadgnutls-e62a2cf1b92dbdc7d955dbb194e7973c5c10a0fe.tar.gz
(gnutls_psk_set_client_credentials): Fix prototype.
-rw-r--r--NEWS6
-rw-r--r--includes/gnutls/gnutls.h.in2
-rw-r--r--lib/gnutls_psk.c6
3 files changed, 11 insertions, 3 deletions
diff --git a/NEWS b/NEWS
index b0bea2032f..a4bc91bd33 100644
--- a/NEWS
+++ b/NEWS
@@ -40,6 +40,12 @@ gnutls_cipher_suite_info. Suggested by Howard Chu <hyc@symas.com>.
** New configure option --disable-tls-authorization to disable tls-authz.
+** Fix prototype for `gnutls_psk_set_client_credentials'.
+The last parameter was renamed from 'flags' to 'format' and the type
+changed from 'unsigned int' to 'gnutls_psk_key_flags' (an enum type),
+which shouldn't cause any ABI changes. Reported by ludo@chbouib.org
+(Ludovic Courtès).
+
** API and ABI modifications:
gnutls_x509_dn_t: ADD.
gnutls_x509_ava_st: ADD.
diff --git a/includes/gnutls/gnutls.h.in b/includes/gnutls/gnutls.h.in
index 8d1168fe39..5d9854bd98 100644
--- a/includes/gnutls/gnutls.h.in
+++ b/includes/gnutls/gnutls.h.in
@@ -920,7 +920,7 @@ extern "C"
int gnutls_psk_set_client_credentials (gnutls_psk_client_credentials_t res,
const char *username,
const gnutls_datum * key,
- unsigned int flags);
+ gnutls_psk_key_flags format);
typedef enum gnutls_psk_key_flags
{
GNUTLS_PSK_KEY_RAW = 0,
diff --git a/lib/gnutls_psk.c b/lib/gnutls_psk.c
index f544ce4fe5..9fa091cae3 100644
--- a/lib/gnutls_psk.c
+++ b/lib/gnutls_psk.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2005 Free Software Foundation
+ * Copyright (C) 2005, 2007 Free Software Foundation
*
* Author: Nikos Mavroyanopoulos
*
@@ -78,6 +78,8 @@ gnutls_psk_allocate_client_credentials (gnutls_psk_client_credentials_t * sc)
* @res: is an #gnutls_psk_client_credentials_t structure.
* @username: is the user's zero-terminated userid
* @key: is the user's key
+ * @format: indicate the format of the key, either
+ * %GNUTLS_PSK_KEY_RAW or %GNUTLS_PSK_KEY_HEX.
*
* This function sets the username and password, in a
* gnutls_psk_client_credentials_t structure. Those will be used in
@@ -92,7 +94,7 @@ int
gnutls_psk_set_client_credentials (gnutls_psk_client_credentials_t res,
const char *username,
const gnutls_datum * key,
- unsigned int flags)
+ gnutls_psk_key_flags flags)
{
int ret;