ngtcp2_crypto_gnutls_configure_server_session

Synopsis

#include <ngtcp2/ngtcp2_crypto_gnutls.h>

int ngtcp2_crypto_gnutls_configure_server_session(gnutls_session_t session)

ngtcp2_crypto_gnutls_configure_server_session() configures session for server side QUIC connection. It performs the following modifications:

  • Set gnutls_handshake_set_secret_function.

  • Set gnutls_handshake_set_read_function.

  • Set gnutls_alert_set_read_function.

  • Register a TLS extension handler for QUIC Transport Parameters.

Application must set a pointer to ngtcp2_crypto_conn_ref to gnutls_session_t object by calling gnutls_session_set_ptr, and ngtcp2_crypto_conn_ref object must have ngtcp2_crypto_conn_ref.get_conn field assigned to get ngtcp2_conn.

It returns 0 if it succeeds, or -1.