diff options
Diffstat (limited to 'lib/ext/pre_shared_key.h')
-rw-r--r-- | lib/ext/pre_shared_key.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/ext/pre_shared_key.h b/lib/ext/pre_shared_key.h index 25dd159f6e..2e830ff52e 100644 --- a/lib/ext/pre_shared_key.h +++ b/lib/ext/pre_shared_key.h @@ -3,13 +3,14 @@ #include "auth/psk.h" #include <hello_ext.h> +#include "tls13/session_ticket.h" extern const hello_ext_entry_st ext_pre_shared_key; inline static -unsigned _gnutls_have_psk_credentials(const gnutls_psk_client_credentials_t cred) +unsigned _gnutls_have_psk_credentials(const gnutls_psk_client_credentials_t cred, gnutls_session_t session) { - if (cred->get_function || cred->username.data) + if ((cred->get_function || cred->username.data) && session->internals.priorities->have_psk) return 1; else return 0; |