diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2011-02-10 09:56:32 +0100 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2011-02-10 09:56:32 +0100 |
commit | c8402c600abe71dcc480faff940f616723516e19 (patch) | |
tree | 0aa3301a69de4e204f87de4667dd1a217b7c8056 /lib/auth_psk.h | |
parent | 5bd1eb74b78a906b9eda81be94c15d8d91185586 (diff) | |
download | gnutls-c8402c600abe71dcc480faff940f616723516e19.tar.gz |
Callback function is being called in both PSK-DHE and PSK.
Using the callback function will not overwrite the credentials,
which were wrongly being overwritten using the retrieved username/key.
The credentials structure is now accessed for reading only, as it
should have been.
(backported)
Diffstat (limited to 'lib/auth_psk.h')
-rw-r--r-- | lib/auth_psk.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/auth_psk.h b/lib/auth_psk.h index c79da6b79f..40e88f1481 100644 --- a/lib/auth_psk.h +++ b/lib/auth_psk.h @@ -68,7 +68,11 @@ typedef struct psk_auth_info_st typedef struct psk_auth_info_st psk_auth_info_st; int -_gnutls_set_psk_session_key (gnutls_session_t session, gnutls_datum_t * psk2); +_gnutls_set_psk_session_key (gnutls_session_t session, gnutls_datum_t* key, gnutls_datum_t * psk2); + +int _gnutls_find_psk_key( gnutls_session_t session, gnutls_psk_client_credentials_t cred, + gnutls_datum_t * username, gnutls_datum* key, int* free); + #else #define _gnutls_set_psk_session_key(x,y) GNUTLS_E_INTERNAL_ERROR #endif /* ENABLE_PSK */ |