Lines Matching refs:s
459 plugin_ssl_ctx * const s = p->ssl_ctxs + i; in mod_mbedtls_free_config() local
460 if (s->ssl_ctx && s->ssl_ctx != ssl_ctx_global_scope) { in mod_mbedtls_free_config()
461 mbedtls_ssl_config_free(s->ssl_ctx); in mod_mbedtls_free_config()
462 free(s->ciphersuites); in mod_mbedtls_free_config()
463 free(s->curves); in mod_mbedtls_free_config()
1315 mod_mbedtls_ssl_conf_ciphersuites (server *srv, plugin_config_socket *s, buffer *ciphersuites, cons…
1319 mod_mbedtls_ssl_conf_curves(server *srv, plugin_config_socket *s, const buffer *curvelist);
1323 mod_mbedtls_ssl_conf_dhparameters(server *srv, plugin_config_socket *s, const buffer *dhparameters);
1327 mod_mbedtls_ssl_conf_proto (server *srv, plugin_config_socket *s, const buffer *b, int max);
1331 mod_mbedtls_ssl_conf_cmd (server *srv, plugin_config_socket *s) in mod_mbedtls_ssl_conf_cmd() argument
1339 for (size_t i = 0; i < s->ssl_conf_cmd->used; ++i) { in mod_mbedtls_ssl_conf_cmd()
1340 data_string *ds = (data_string *)s->ssl_conf_cmd->data[i]; in mod_mbedtls_ssl_conf_cmd()
1347 if (!mod_mbedtls_ssl_conf_curves(srv, s, &ds->value)) in mod_mbedtls_ssl_conf_cmd()
1352 if (!mod_mbedtls_ssl_conf_dhparameters(srv, s, &ds->value)) in mod_mbedtls_ssl_conf_cmd()
1357 mod_mbedtls_ssl_conf_proto(srv, s, &ds->value, 1); /* max */ in mod_mbedtls_ssl_conf_cmd()
1359 mod_mbedtls_ssl_conf_proto(srv, s, &ds->value, 0); /* min */ in mod_mbedtls_ssl_conf_cmd()
1389 s->ssl_session_ticket = flag; in mod_mbedtls_ssl_conf_cmd()
1398 s->ssl_honor_cipher_order = flag; in mod_mbedtls_ssl_conf_cmd()
1424 if (!mod_mbedtls_ssl_conf_ciphersuites(srv, s, ciphersuites, cipherstring)) in mod_mbedtls_ssl_conf_cmd()
1432 network_init_ssl (server *srv, plugin_config_socket *s, plugin_data *p) in network_init_ssl() argument
1436 s->ssl_ctx = ck_malloc(sizeof(mbedtls_ssl_config)); in network_init_ssl()
1437 mbedtls_ssl_config_init(s->ssl_ctx); in network_init_ssl()
1440 mbedtls_ssl_conf_rng(s->ssl_ctx, mbedtls_ctr_drbg_random, &p->ctr_drbg); in network_init_ssl()
1449 rc = mbedtls_ssl_config_defaults(s->ssl_ctx, in network_init_ssl()
1459 if (s->ssl_cipher_list) { in network_init_ssl()
1460 if (!mod_mbedtls_ssl_conf_ciphersuites(srv,s,NULL,s->ssl_cipher_list)) in network_init_ssl()
1465 if (s->pc->need_chain) { in network_init_ssl()
1466 s->pc->need_chain = 0; /*(attempt once to complete chain)*/ in network_init_ssl()
1467 if (0 != mod_mbedtls_construct_crt_chain(s->ssl_pemfile_x509, in network_init_ssl()
1468 s->ssl_ca_file, srv->errh)) in network_init_ssl()
1472 rc = mbedtls_ssl_conf_own_cert(s->ssl_ctx, in network_init_ssl()
1473 s->ssl_pemfile_x509, s->ssl_pemfile_pkey); in network_init_ssl()
1477 s->ssl_pemfile->ptr, s->ssl_privkey->ptr); in network_init_ssl()
1482 mbedtls_ssl_conf_cert_cb(s->ssl_ctx, mod_mbedtls_cert_cb); in network_init_ssl()
1500 const char **alpn_protos = (s->ssl_acme_tls_1) in network_init_ssl()
1504 rc = mbedtls_ssl_conf_alpn_protocols(s->ssl_ctx, alpn_protos); in network_init_ssl()
1511 mod_mbedtls_ssl_conf_proto(srv, s, NULL, 0); /* min */ in network_init_ssl()
1513 if (s->ssl_conf_cmd && s->ssl_conf_cmd->used) { in network_init_ssl()
1514 if (0 != mod_mbedtls_ssl_conf_cmd(srv, s)) return -1; in network_init_ssl()
1518 int order = s->ssl_honor_cipher_order in network_init_ssl()
1521 mbedtls_ssl_conf_preference_order(s->ssl_ctx, order); in network_init_ssl()
1528 if (s->ssl_session_ticket /*(.ticket_lifetime is private)*/ in network_init_ssl()
1540 if (s->ssl_session_ticket) in network_init_ssl()
1541 mbedtls_ssl_conf_session_tickets_cb(s->ssl_ctx, in network_init_ssl()
1733 plugin_ssl_ctx * const s = p->ssl_ctxs + sidx; in mod_mbedtls_set_defaults_sockets() local
1734 *s = *p->ssl_ctxs;/*(copy struct of ssl_ctx from global scope)*/ in mod_mbedtls_set_defaults_sockets()
1754 plugin_ssl_ctx * const s = p->ssl_ctxs + sidx; in mod_mbedtls_set_defaults_sockets() local
1755 s->ssl_ctx = conf.ssl_ctx; in mod_mbedtls_set_defaults_sockets()
1756 s->ciphersuites = conf.ciphersuites; in mod_mbedtls_set_defaults_sockets()
1757 s->curves = conf.curves; in mod_mbedtls_set_defaults_sockets()
2608 const char *s; in http_cgi_ssl_env() local
2610 s = mbedtls_ssl_get_version(&hctx->ssl); in http_cgi_ssl_env()
2611 http_header_env_set(r, CONST_STR_LEN("SSL_PROTOCOL"), s, strlen(s)); in http_cgi_ssl_env()
2619 s = mbedtls_ssl_ciphersuite_get_name(ciphersuite_info); in http_cgi_ssl_env()
2620 http_header_env_set(r, CONST_STR_LEN("SSL_CIPHER"), s, strlen(s)); in http_cgi_ssl_env()
3409 mod_mbedtls_ssl_conf_ciphersuites (server *srv, plugin_config_socket *s, buffer *ciphersuites, cons… in mod_mbedtls_ssl_conf_ciphersuites() argument
3494 #define strncmp_const(s,cs) strncmp((s),(cs),sizeof(cs)-1) in mod_mbedtls_ssl_conf_ciphersuites() argument
3516 mbedtls_ssl_conf_cert_profile(s->ssl_ctx, in mod_mbedtls_ssl_conf_ciphersuites()
3520 mbedtls_mpi_free(&s->ssl_ctx->MBEDTLS_PRIVATE(dhm_P)); in mod_mbedtls_ssl_conf_ciphersuites()
3521 mbedtls_mpi_free(&s->ssl_ctx->MBEDTLS_PRIVATE(dhm_G)); in mod_mbedtls_ssl_conf_ciphersuites()
3523 int rc = mbedtls_ssl_config_defaults(s->ssl_ctx, in mod_mbedtls_ssl_conf_ciphersuites()
3551 mbedtls_ssl_conf_ciphersuites(s->ssl_ctx, ssl_preset_suiteb192); in mod_mbedtls_ssl_conf_ciphersuites()
3552 mbedtls_ssl_conf_cert_profile(s->ssl_ctx, in mod_mbedtls_ssl_conf_ciphersuites()
3554 mbedtls_ssl_conf_dhm_min_bitlen(s->ssl_ctx, 3072); in mod_mbedtls_ssl_conf_ciphersuites()
3930 if (cipherstring != s->ssl_cipher_list && s->ssl_cipher_list) in mod_mbedtls_ssl_conf_ciphersuites()
3949 mbedtls_ssl_conf_cert_profile(s->ssl_ctx, in mod_mbedtls_ssl_conf_ciphersuites()
3953 free(s->ciphersuites); in mod_mbedtls_ssl_conf_ciphersuites()
3954 s->ciphersuites = ck_malloc(nids * sizeof(int)); in mod_mbedtls_ssl_conf_ciphersuites()
3955 memcpy(s->ciphersuites, ids, nids * sizeof(int)); in mod_mbedtls_ssl_conf_ciphersuites()
3957 mbedtls_ssl_conf_ciphersuites(s->ssl_ctx, s->ciphersuites); in mod_mbedtls_ssl_conf_ciphersuites()
3977 mod_mbedtls_ssl_conf_curves(server *srv, plugin_config_socket *s, const buffer *curvelist) in mod_mbedtls_ssl_conf_curves() argument
4013 s->curves = ck_malloc(nids * sizeof(mbedtls_ecp_group_id)); in mod_mbedtls_ssl_conf_curves()
4014 memcpy(s->curves, ids, nids * sizeof(mbedtls_ecp_group_id)); in mod_mbedtls_ssl_conf_curves()
4016 mbedtls_ssl_conf_curves(s->ssl_ctx, s->curves); in mod_mbedtls_ssl_conf_curves()
4034 mod_mbedtls_ssl_conf_curves(server *srv, plugin_config_socket *s, const buffer *curvelist) in mod_mbedtls_ssl_conf_curves() argument
4070 s->curves = ck_malloc(nids * sizeof(uint16_t)); in mod_mbedtls_ssl_conf_curves()
4071 memcpy(s->curves, ids, nids * sizeof(uint16_t)); in mod_mbedtls_ssl_conf_curves()
4073 mbedtls_ssl_conf_groups(s->ssl_ctx, s->curves); in mod_mbedtls_ssl_conf_curves()
4080 mod_mbedtls_ssl_conf_dhparameters(server *srv, plugin_config_socket *s, const buffer *dhparameters) in mod_mbedtls_ssl_conf_dhparameters() argument
4089 rc = mbedtls_ssl_conf_dh_param_ctx(s->ssl_ctx, &dhm); in mod_mbedtls_ssl_conf_dhparameters()
4101 mod_mbedtls_ssl_conf_proto (server *srv, plugin_config_socket *s, const buffer *b, int max) in mod_mbedtls_ssl_conf_proto() argument
4168 ? mbedtls_ssl_conf_max_version(s->ssl_ctx,MBEDTLS_SSL_MAJOR_VERSION_3,v) in mod_mbedtls_ssl_conf_proto()
4169 : mbedtls_ssl_conf_min_version(s->ssl_ctx,MBEDTLS_SSL_MAJOR_VERSION_3,v); in mod_mbedtls_ssl_conf_proto()
4173 mod_mbedtls_ssl_conf_proto (server *srv, plugin_config_socket *s, const buffer *b, int max) in mod_mbedtls_ssl_conf_proto() argument
4201 ? mbedtls_ssl_conf_max_tls_version(s->ssl_ctx, v) in mod_mbedtls_ssl_conf_proto()
4202 : mbedtls_ssl_conf_min_tls_version(s->ssl_ctx, v); in mod_mbedtls_ssl_conf_proto()