Lines Matching refs:ssl

193     mbedtls_ssl_context ssl;      /* mbedtls request/connection context */  member
219 mbedtls_ssl_free(&hctx->ssl); in handler_ctx_free()
724 mod_mbedtls_SNI (void *arg, mbedtls_ssl_context *ssl, const unsigned char *servername, size_t len) in mod_mbedtls_SNI() argument
777 mbedtls_ssl_set_hs_own_cert(ssl, in mod_mbedtls_SNI()
804 mbedtls_ssl_context * const ssl = &hctx->ssl; in mod_mbedtls_conf_verify() local
810 mbedtls_ssl_set_hs_authmode(ssl, mode); in mod_mbedtls_conf_verify()
811 mbedtls_ssl_set_hs_ca_chain(ssl, hctx->conf.ssl_ca_file, in mod_mbedtls_conf_verify()
814 mbedtls_ssl_set_hs_dn_hints(ssl, hctx->conf.ssl_ca_dn_file); in mod_mbedtls_conf_verify()
821 mbedtls_ssl_set_hs_ca_chain(ssl, ca_certs, hctx->conf.ssl_ca_crl_file); in mod_mbedtls_conf_verify()
824 mbedtls_ssl_set_verify(ssl, mod_mbedtls_verify_cb, hctx); in mod_mbedtls_conf_verify()
1127 rc = mbedtls_ssl_set_hs_own_cert(&hctx->ssl, in mod_mbedtls_acme_tls_1()
1168 if (hctx->ssl.major_ver == MBEDTLS_SSL_MAJOR_VERSION_3 in mod_mbedtls_alpn_h2_policy()
1169 && hctx->ssl.minor_ver < MBEDTLS_SSL_MINOR_VERSION_3) { in mod_mbedtls_alpn_h2_policy()
1277 mod_mbedtls_cert_cb (mbedtls_ssl_context * const ssl) in mod_mbedtls_cert_cb() argument
1279 handler_ctx * const hctx = mbedtls_ssl_get_user_data_p(ssl); in mod_mbedtls_cert_cb()
1283 const char *alpn = mbedtls_ssl_get_alpn_protocol(&hctx->ssl); in mod_mbedtls_cert_cb()
1292 const unsigned char *servername = mbedtls_ssl_get_hs_sni(ssl, &len); in mod_mbedtls_cert_cb()
1294 rc = mod_mbedtls_SNI(hctx, ssl, servername, len); in mod_mbedtls_cert_cb()
2011 if (0 != hctx->ssl.out_left) /* partial write; save attempted wr_len */ in mod_mbedtls_ssl_write_err()
2027 mbedtls_ssl_context * const ssl = &hctx->ssl; in connection_write_cq_ssl() local
2032 if (0 != ssl->out_left) in connection_write_cq_ssl()
2037 wr = mbedtls_ssl_write(ssl, NULL, data_len); in connection_write_cq_ssl()
2049 const int lim = mbedtls_ssl_get_max_out_record_payload(ssl); in connection_write_cq_ssl()
2089 wr = mbedtls_ssl_write(ssl, (const unsigned char *)data, wr_len); in connection_write_cq_ssl()
2107 #define handshake_state(ssl) (ssl)->MBEDTLS_PRIVATE(state) argument
2109 #define handshake_state(ssl) (ssl)->state argument
2112 static int ssl_parse_client_hello( mbedtls_ssl_context *ssl, handler_ctx *hctx );
2125 rc = mbedtls_ssl_handshake(&hctx->ssl); in mod_mbedtls_ssl_handshake()
2137 if (handshake_state(&hctx->ssl) < MBEDTLS_SSL_SERVER_HELLO) { in mod_mbedtls_ssl_handshake()
2138 while (handshake_state(&hctx->ssl) != MBEDTLS_SSL_SERVER_HELLO in mod_mbedtls_ssl_handshake()
2139 && handshake_state(&hctx->ssl) != MBEDTLS_SSL_HANDSHAKE_OVER) { in mod_mbedtls_ssl_handshake()
2148 rc = ssl_parse_client_hello(&hctx->ssl, hctx); in mod_mbedtls_ssl_handshake()
2154 rc = mbedtls_ssl_handshake_step(&hctx->ssl); in mod_mbedtls_ssl_handshake()
2158 && handshake_state(&hctx->ssl) == MBEDTLS_SSL_SERVER_HELLO) { in mod_mbedtls_ssl_handshake()
2160 const char *alpn = mbedtls_ssl_get_alpn_protocol(&hctx->ssl); in mod_mbedtls_ssl_handshake()
2168 && handshake_state(&hctx->ssl) >= MBEDTLS_SSL_SERVER_HELLO in mod_mbedtls_ssl_handshake()
2169 && handshake_state(&hctx->ssl) <= MBEDTLS_SSL_SERVER_HELLO_DONE in mod_mbedtls_ssl_handshake()
2174 mbedtls_ssl_set_hs_authmode(&hctx->ssl, mode); in mod_mbedtls_ssl_handshake()
2175 while (handshake_state(&hctx->ssl) != MBEDTLS_SSL_CERTIFICATE_REQUEST in mod_mbedtls_ssl_handshake()
2176 && handshake_state(&hctx->ssl) != MBEDTLS_SSL_HANDSHAKE_OVER) { in mod_mbedtls_ssl_handshake()
2177 rc = mbedtls_ssl_handshake_step(&hctx->ssl); in mod_mbedtls_ssl_handshake()
2181 && handshake_state(&hctx->ssl) == MBEDTLS_SSL_CERTIFICATE_REQUEST) { in mod_mbedtls_ssl_handshake()
2184 rc = mbedtls_ssl_handshake_step(&hctx->ssl); in mod_mbedtls_ssl_handshake()
2189 && handshake_state(&hctx->ssl)==MBEDTLS_SSL_SERVER_HELLO_DONE) { in mod_mbedtls_ssl_handshake()
2190 mbedtls_ssl_context * const ssl = &hctx->ssl; in mod_mbedtls_ssl_handshake() local
2193 mbedtls_ssl_set_hs_ca_chain(ssl, ca_certs, ca_crl); in mod_mbedtls_ssl_handshake()
2198 if (0 == rc && handshake_state(&hctx->ssl) != MBEDTLS_SSL_HANDSHAKE_OVER) { in mod_mbedtls_ssl_handshake()
2199 rc = mbedtls_ssl_handshake(&hctx->ssl); in mod_mbedtls_ssl_handshake()
2261 len = mbedtls_ssl_get_bytes_avail(&hctx->ssl); in connection_read_cq_ssl()
2266 len = mbedtls_ssl_read(&hctx->ssl, (unsigned char *)mem, mem_len); in connection_read_cq_ssl()
2269 && mbedtls_ssl_check_pending(&hctx->ssl)); in connection_read_cq_ssl()
2336 mbedtls_ssl_init(&hctx->ssl); in CONNECTION_FUNC()
2337 int rc = mbedtls_ssl_setup(&hctx->ssl, hctx->ssl_ctx); in CONNECTION_FUNC()
2350 mbedtls_ssl_set_user_data_p(&hctx->ssl, hctx); in CONNECTION_FUNC()
2353 mbedtls_ssl_set_bio(&hctx->ssl, (mbedtls_net_context *)&con->fd, in CONNECTION_FUNC()
2407 int rc = mbedtls_ssl_close_notify(&hctx->ssl); in mod_mbedtls_close_notify()
2420 mbedtls_ssl_session_reset(&hctx->ssl); in mod_mbedtls_close_notify()
2542 const mbedtls_x509_crt *crt = mbedtls_ssl_get_peer_cert(&hctx->ssl); in https_add_ssl_client_entries()
2546 ? mbedtls_ssl_get_verify_result(&hctx->ssl) in https_add_ssl_client_entries()
2599 #define mbedtls_ssl_get_ciphersuite_id_from_ssl(ssl) \ argument
2600 (ssl)->MBEDTLS_PRIVATE(session)->MBEDTLS_PRIVATE(ciphersuite)
2610 s = mbedtls_ssl_get_version(&hctx->ssl); in http_cgi_ssl_env()
2614 mbedtls_ssl_get_ciphersuite_id_from_ssl(&hctx->ssl); in http_cgi_ssl_env()
2644 hctx->ssl.transform->cipher_ctx_enc.key_bitlen; in http_cgi_ssl_env()
2647 hctx->ssl.transform->cipher_ctx_enc.cipher_info->key_bitlen; in http_cgi_ssl_env()
4224 static int ssl_parse_client_hello( mbedtls_ssl_context *ssl, handler_ctx *hctx ) in ssl_parse_client_hello() argument
4236 if( ssl->renego_status == MBEDTLS_SSL_INITIAL_HANDSHAKE ) in ssl_parse_client_hello()
4239 if( ( ret = mbedtls_ssl_fetch_input( ssl, 5 ) ) != 0 ) in ssl_parse_client_hello()
4247 buf = ssl->in_hdr; in ssl_parse_client_hello()
4267 if( ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM ) in ssl_parse_client_hello()
4271 msg_len = ( ssl->in_len[0] << 8 ) | ssl->in_len[1]; in ssl_parse_client_hello()
4274 if( ssl->renego_status != MBEDTLS_SSL_INITIAL_HANDSHAKE ) in ssl_parse_client_hello()
4277 msg_len = ssl->in_hslen; in ssl_parse_client_hello()
4287 if( ( ret = mbedtls_ssl_fetch_input( ssl, in ssl_parse_client_hello()
4295 buf = ssl->in_msg; in ssl_parse_client_hello()
4356 ssl->conf->transport, buf ); in ssl_parse_client_hello()
4363 if( sess_len > sizeof( ssl->session_negotiate->id ) || in ssl_parse_client_hello()