1 #ifndef GNUTLS_LIB_EXT_PRE_SHARED_KEY_H 2 #define GNUTLS_LIB_EXT_PRE_SHARED_KEY_H 3 4 #include "auth/psk.h" 5 #include <hello_ext.h> 6 #include "tls13/session_ticket.h" 7 8 #define PRE_SHARED_KEY_TLS_ID 41 9 10 extern const hello_ext_entry_st ext_mod_pre_shared_key; 11 12 inline static _gnutls_have_psk_credentials(const gnutls_psk_client_credentials_t cred,gnutls_session_t session)13unsigned _gnutls_have_psk_credentials(const gnutls_psk_client_credentials_t cred, gnutls_session_t session) 14 { 15 if ((cred->get_function || cred->username.data) && session->internals.priorities->have_psk) 16 return 1; 17 else 18 return 0; 19 } 20 21 int _gnutls_generate_early_secrets_for_psk(gnutls_session_t session); 22 23 #endif /* GNUTLS_LIB_EXT_PRE_SHARED_KEY_H */ 24