ngtcp2_crypto_ossl_configure_server_session

Synopsis

#include <ngtcp2/ngtcp2_crypto_ossl.h>

int ngtcp2_crypto_ossl_configure_server_session(SSL *ssl)

ngtcp2_crypto_ossl_configure_server_session() configures ssl for server side QUIC connection. It performs the following modifications:

  • Register callbacks via SSL_set_quic_tls_cbs

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

Application must call SSL_set_app_data(ssl, NULL) before calling SSL_free(ssl) if you cannot make ngtcp2_conn() object alive until SSL_free is called.

It returns 0 if it succeeds, or -1.