diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/constate.c | 4 | ||||
-rw-r--r-- | lib/gnutls_int.h | 2 | ||||
-rw-r--r-- | lib/includes/gnutls/gnutls.h.in | 22 | ||||
-rw-r--r-- | lib/kx.c | 12 | ||||
-rw-r--r-- | lib/kx.h | 4 | ||||
-rw-r--r-- | lib/libgnutls.map | 2 | ||||
-rw-r--r-- | lib/state.c | 2 |
7 files changed, 24 insertions, 24 deletions
diff --git a/lib/constate.c b/lib/constate.c index a11577d7ba..a650997c1c 100644 --- a/lib/constate.c +++ b/lib/constate.c @@ -197,7 +197,7 @@ _tls13_update_keys(gnutls_session_t session, hs_stage_t stage, char buf[65]; record_state_st *upd_state; record_parameters_st *prev = NULL; - gnutls_handshake_secret_type_t secret_type; + gnutls_secret_type_t secret_type; int ret; /* generate new keys for direction needed and copy old from previous epoch */ @@ -396,7 +396,7 @@ _tls13_set_keys(gnutls_session_t session, hs_stage_t stage, record_state_st *client_write, *server_write; const char *label; unsigned label_size, hsk_len; - gnutls_handshake_secret_type_t secret_type; + gnutls_secret_type_t secret_type; void *ckey, *skey; int ret; diff --git a/lib/gnutls_int.h b/lib/gnutls_int.h index cd2adc103d..57a961d9e9 100644 --- a/lib/gnutls_int.h +++ b/lib/gnutls_int.h @@ -1243,7 +1243,7 @@ typedef struct { unsigned int h_type; /* the hooked type */ int16_t h_post; /* whether post-generation/receive */ - gnutls_handshake_secret_func secret_func; + gnutls_secret_callback_t secret_func; /* holds the selected certificate and key. * use _gnutls_selected_certs_deinit() and _gnutls_selected_certs_set() diff --git a/lib/includes/gnutls/gnutls.h.in b/lib/includes/gnutls/gnutls.h.in index 13b6c35659..8eb546c1a0 100644 --- a/lib/includes/gnutls/gnutls.h.in +++ b/lib/includes/gnutls/gnutls.h.in @@ -2293,7 +2293,7 @@ void gnutls_global_set_audit_log_function(gnutls_audit_log_func log_func); void gnutls_global_set_log_level(int level); /** - * gnutls_handshake_secret_type_t: + * gnutls_secret_type_t: * @GNUTLS_SECRET_CLIENT_RANDOM: 48 bytes for the master secret (for SSL 3.0, * TLS 1.0, 1.1 and 1.2) * @GNUTLS_SECRET_CLIENT_EARLY_TRAFFIC_SECRET: the early traffic secret for the @@ -2312,7 +2312,7 @@ void gnutls_global_set_log_level(int level); * 1-RTT keys) * * Enumeration of different types of secrets derived during handshake. - * This is used by gnutls_handshake_set_secret_function(). + * This is used by gnutls_session_set_secret_function(). * * Since: 3.6.13 */ @@ -2325,25 +2325,25 @@ typedef enum { GNUTLS_SECRET_SERVER_TRAFFIC_SECRET, GNUTLS_SECRET_EARLY_EXPORTER_SECRET, GNUTLS_SECRET_EXPORTER_SECRET -} gnutls_handshake_secret_type_t; +} gnutls_secret_type_t; /** - * gnutls_handshake_secret_function: + * gnutls_secret_callbacK_t: * @session: the current session - * @type: #gnutls_handshake_secret_type_t + * @type: #gnutls_secret_type_t * @secret: the (const) data of the derived secret. * * Function prototype for secret derivation hooks. It is set using - * gnutls_handshake_set_secret_function(). + * gnutls_session_set_secret_function(). * * Returns: Non zero on error. * Since: 3.6.13 */ -typedef int (*gnutls_handshake_secret_func) (gnutls_session_t session, - gnutls_handshake_secret_type_t type, - const gnutls_datum_t *secret); -void gnutls_handshake_set_secret_function(gnutls_session_t session, - gnutls_handshake_secret_func func); +typedef int (*gnutls_secret_callback_t) (gnutls_session_t session, + gnutls_secret_type_t type, + const gnutls_datum_t *secret); +void gnutls_session_set_secret_function(gnutls_session_t session, + gnutls_secret_callback_t func); /* Diffie-Hellman parameter handling. */ @@ -71,7 +71,7 @@ int _gnutls_generate_master(gnutls_session_t session, int keep_premaster) } /** - * gnutls_handshake_set_secret_function: + * gnutls_session_set_secret_function: * @session: is #gnutls_session_t type * @func: is the function to be called * @@ -81,15 +81,15 @@ int _gnutls_generate_master(gnutls_session_t session, int keep_premaster) * Since: 3.6.13 */ void -gnutls_handshake_set_secret_function(gnutls_session_t session, - gnutls_handshake_secret_func func) +gnutls_session_set_secret_function(gnutls_session_t session, + gnutls_secret_callback_t func) { session->internals.secret_func = func; } int _gnutls_call_secret_func(gnutls_session_t session, - gnutls_handshake_secret_type_t type, + gnutls_secret_type_t type, const uint8_t *data, unsigned size) { @@ -101,7 +101,7 @@ _gnutls_call_secret_func(gnutls_session_t session, } static const char * -secret_type_to_nss_keylog_label(gnutls_handshake_secret_type_t type) +secret_type_to_nss_keylog_label(gnutls_secret_type_t type) { switch (type) { case GNUTLS_SECRET_CLIENT_RANDOM: @@ -128,7 +128,7 @@ secret_type_to_nss_keylog_label(gnutls_handshake_secret_type_t type) int _gnutls_nss_keylog_secret_func(gnutls_session_t session, - gnutls_handshake_secret_type_t type, + gnutls_secret_type_t type, const gnutls_datum_t *secret) { const char *label; @@ -39,14 +39,14 @@ int _gnutls_send_server_crt_request(gnutls_session_t session, int again); int _gnutls_recv_client_certificate_verify_message(gnutls_session_t session); int _gnutls_call_secret_func(gnutls_session_t session, - gnutls_handshake_secret_type_t type, + gnutls_secret_type_t type, const uint8_t *data, unsigned size); void _gnutls_nss_keylog_write(gnutls_session_t session, const char *label, const uint8_t *secret, size_t secret_size); int _gnutls_nss_keylog_secret_func(gnutls_session_t session, - gnutls_handshake_secret_type_t type, + gnutls_secret_type_t type, const gnutls_datum_t *secret); #endif /* GNUTLS_LIB_KX_H */ diff --git a/lib/libgnutls.map b/lib/libgnutls.map index c1aace905e..43968a9f12 100644 --- a/lib/libgnutls.map +++ b/lib/libgnutls.map @@ -1315,7 +1315,7 @@ GNUTLS_3_6_13 gnutls_hkdf_extract; gnutls_hkdf_expand; gnutls_pbkdf2; - gnutls_handshake_set_secret_function; + gnutls_session_set_secret_function; } GNUTLS_3_6_12; GNUTLS_FIPS140_3_4 { diff --git a/lib/state.c b/lib/state.c index f33cd5a8bc..8f02abdf79 100644 --- a/lib/state.c +++ b/lib/state.c @@ -589,7 +589,7 @@ int gnutls_init(gnutls_session_t * session, unsigned int flags) (*session)->internals.flags |= INT_FLAG_NO_TLS13; /* Install the default secret function */ - gnutls_handshake_set_secret_function(*session, + gnutls_session_set_secret_function(*session, _gnutls_nss_keylog_secret_func); return 0; |