diff options
author | Grigorii Demidov <grigorii.demidov@nic.cz> | 2018-05-21 17:55:35 +0200 |
---|---|---|
committer | Petr Špaček <petr.spacek@nic.cz> | 2018-06-13 15:47:00 +0200 |
commit | 874f4c56388710a4a81015ab33787e81ec959e9c (patch) | |
tree | d0cf27b12c99a5293f634a9e45dd359974ffc4b7 /daemon/tls.h | |
parent | Merge branch 'tls-ciphers' into 'master' (diff) | |
download | knot-resolver-874f4c56388710a4a81015ab33787e81ec959e9c.tar.xz knot-resolver-874f4c56388710a4a81015ab33787e81ec959e9c.zip |
daemon/tls: session resumption with tickets (client & server side)
Diffstat (limited to 'daemon/tls.h')
-rw-r--r-- | daemon/tls.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/daemon/tls.h b/daemon/tls.h index 00330ef4..eb1454ee 100644 --- a/daemon/tls.h +++ b/daemon/tls.h @@ -42,6 +42,7 @@ struct tls_client_paramlist_entry { array_t(const char *) hostnames; array_t(const char *) pins; gnutls_certificate_credentials_t credentials; + gnutls_datum_t session_data; }; struct worker_ctx; @@ -96,9 +97,11 @@ struct tls_client_ctx_t { * this field must be always at first position */ struct tls_common_ctx c; - const struct tls_client_paramlist_entry *params; + struct tls_client_paramlist_entry *params; }; +struct tls_session_ticket_ctx; + /*! Create an empty TLS context in query context */ struct tls_ctx_t* tls_new(struct worker_ctx *worker); @@ -164,5 +167,12 @@ int tls_client_connect_start(struct tls_client_ctx_t *client_ctx, tls_handshake_cb handshake_cb); int tls_client_ctx_set_params(struct tls_client_ctx_t *ctx, - const struct tls_client_paramlist_entry *entry, + struct tls_client_paramlist_entry *entry, struct session *session); + +/** Create the session ticket context and copy the salt. */ +struct tls_session_ticket_ctx* tls_session_ticket_ctx_create(uv_loop_t *loop, + const char *salt, + size_t salt_len); +/** Free all resources of the session ticket context. */ +void tls_session_ticket_ctx_destroy(struct tls_session_ticket_ctx *ctx); |