Skip to content

uvhttp_tls.h ​

Functions ​

uvhttp_tls_init(uvhttp_context_t *context) ​

uvhttp_tls_cleanup(uvhttp_context_t *context) ​

Return Type: void

uvhttp_tls_context_new(uvhttp_tls_context_t **ctx) ​

createnew TLS context

Parameters:

  • ctx: outputParameter, Used forreceive TLS context

Returns: UVHTTP_OK Success, othervaluerepresentsFailure

Note: Successwhen, *ctx issettovalid TLS contextobject, mustUse uvhttp_tls_context_free release Note: Failurewhen, *ctx issetto NULL

uvhttp_tls_context_free(uvhttp_tls_context_t *ctx) ​

Return Type: void

uvhttp_tls_context_load_cert_chain(uvhttp_tls_context_t *ctx, const char *cert_file) ​

uvhttp_tls_context_load_private_key(uvhttp_tls_context_t *ctx, const char *key_file) ​

uvhttp_tls_context_load_ca_file(uvhttp_tls_context_t *ctx, const char *ca_file) ​

uvhttp_tls_context_enable_client_auth(uvhttp_tls_context_t *ctx, int require_cert) ​

uvhttp_tls_context_set_verify_depth(uvhttp_tls_context_t *ctx, int depth) ​

uvhttp_tls_context_set_cipher_suites(uvhttp_tls_context_t *ctx, const int *cipher_suites) ​

uvhttp_tls_context_enable_session_tickets(uvhttp_tls_context_t *ctx, int enable) ​

uvhttp_tls_context_set_session_cache(uvhttp_tls_context_t *ctx, int max_sessions) ​

uvhttp_tls_context_set_dh_parameters(uvhttp_tls_context_t *ctx, const char *dh_file) ​

uvhttp_tls_create_ssl(uvhttp_tls_context_t *ctx) ​

Return Type: mbedtls_ssl_context *

uvhttp_tls_setup_ssl(mbedtls_ssl_context *ssl, int fd) ​

uvhttp_tls_handshake(mbedtls_ssl_context *ssl) ​

uvhttp_tls_read(mbedtls_ssl_context *ssl, void *buf, size_t len) ​

uvhttp_tls_write(mbedtls_ssl_context *ssl, const void *buf, size_t len) ​

uvhttp_tls_verify_peer_cert(mbedtls_ssl_context *ssl) ​

Return Type: int

uvhttp_tls_verify_hostname(mbedtls_x509_crt *cert, const char *hostname) ​

Return Type: int

uvhttp_tls_check_cert_validity(mbedtls_x509_crt *cert) ​

Return Type: int

uvhttp_tls_get_peer_cert(mbedtls_ssl_context *ssl) ​

Return Type: mbedtls_x509_crt *

uvhttp_tls_get_cert_subject(mbedtls_x509_crt *cert, char *buf, size_t buf_size) ​

Return Type: int

uvhttp_tls_get_cert_issuer(mbedtls_x509_crt *cert, char *buf, size_t buf_size) ​

Return Type: int

uvhttp_tls_get_cert_serial(mbedtls_x509_crt *cert, char *buf, size_t buf_size) ​

Return Type: int

uvhttp_tls_context_enable_crl_checking(uvhttp_tls_context_t *ctx, int enable) ​

uvhttp_tls_load_crl_file(uvhttp_tls_context_t *ctx, const char *crl_file) ​

uvhttp_tls_context_enable_tls13(uvhttp_tls_context_t *ctx, int enable) ​

uvhttp_tls_context_set_tls13_cipher_suites(uvhttp_tls_context_t *ctx, const char *cipher_suites) ​

uvhttp_tls_context_enable_early_data(uvhttp_tls_context_t *ctx, int enable) ​

uvhttp_tls_context_set_ticket_key(uvhttp_tls_context_t *ctx, const unsigned char *key, size_t key_len) ​

uvhttp_tls_context_rotate_ticket_key(uvhttp_tls_context_t *ctx) ​

uvhttp_tls_context_set_ticket_lifetime(uvhttp_tls_context_t *ctx, int lifetime_seconds) ​

uvhttp_tls_verify_cert_chain(mbedtls_ssl_context *ssl) ​

uvhttp_tls_context_add_extra_chain_cert(uvhttp_tls_context_t *ctx, const char *cert_file) ​

uvhttp_tls_get_cert_chain(mbedtls_ssl_context *ssl, mbedtls_x509_crt **chain) ​

uvhttp_tls_get_stats(uvhttp_tls_context_t *ctx, uvhttp_tls_stats_t *stats) ​

uvhttp_tls_reset_stats(uvhttp_tls_context_t *ctx) ​

uvhttp_tls_get_connection_info(mbedtls_ssl_context *ssl, char *buf, size_t buf_size) ​

uvhttp_tls_get_error_string(int ret, char *buf, size_t buf_size) ​

Return Type: void

uvhttp_tls_print_error(int ret) ​

Return Type: void

Released under MIT License