Lines Matching refs:s
316 ssl_tlsext_ticket_key_cb (SSL *s, unsigned char key_name[16], in ssl_tlsext_ticket_key_cb() argument
324 ssl_tlsext_ticket_key_cb(SSL *s, unsigned char key_name[16], in ssl_tlsext_ticket_key_cb()
329 UNUSED(s); in ssl_tlsext_ticket_key_cb()
573 plugin_ssl_ctx * const s = p->ssl_ctxs + i; in mod_openssl_free_config() local
574 if (s->ssl_ctx && s->ssl_ctx != ssl_ctx_global_scope) in mod_openssl_free_config()
575 SSL_CTX_free(s->ssl_ctx); in mod_openssl_free_config()
1459 const char *s = (const char *)asn1time->data; in mod_openssl_asn1_time_to_posix() local
1460 size_t len = strlen(s); in mod_openssl_asn1_time_to_posix()
1469 x.tm_year = (s[0]-'0')*10 + (s[1]-'0'); in mod_openssl_asn1_time_to_posix()
1471 s += 2; in mod_openssl_asn1_time_to_posix()
1476 x.tm_year = (s[0]-'0')*1000+(s[1]-'0')*100+(s[2]-'0')*10+(s[3]-'0'); in mod_openssl_asn1_time_to_posix()
1477 s += 4; in mod_openssl_asn1_time_to_posix()
1482 x.tm_mon = (s[0]-'0')*10 + (s[1]-'0'); in mod_openssl_asn1_time_to_posix()
1483 x.tm_mday = (s[2]-'0')*10 + (s[3]-'0'); in mod_openssl_asn1_time_to_posix()
1484 x.tm_hour = (s[4]-'0')*10 + (s[5]-'0'); in mod_openssl_asn1_time_to_posix()
1487 s += 6; in mod_openssl_asn1_time_to_posix()
1488 if (len >= 2 && s[0] != '+' && s[0] != '-' && s[0] != 'Z') { in mod_openssl_asn1_time_to_posix()
1490 x.tm_min = (s[0]-'0')*10 + (s[1]-'0'); in mod_openssl_asn1_time_to_posix()
1491 s += 2; in mod_openssl_asn1_time_to_posix()
1492 if (len >= 2 && s[0] != '+' && s[0] != '-' && s[0] != 'Z') { in mod_openssl_asn1_time_to_posix()
1494 x.tm_sec = (s[0]-'0')*10 + (s[1]-'0'); in mod_openssl_asn1_time_to_posix()
1495 s += 2; in mod_openssl_asn1_time_to_posix()
1496 if (len && s[0] == '.') { in mod_openssl_asn1_time_to_posix()
1499 do { ++s; --len; } while (*s >= '0' && *s <= '9'); in mod_openssl_asn1_time_to_posix()
1504 if ((*s == '-' || *s == '+') && len != 5) { in mod_openssl_asn1_time_to_posix()
1505 offset = ((s[1]-'0')*10 + (s[2]-'0')) * 3600 in mod_openssl_asn1_time_to_posix()
1506 + ((s[3]-'0')*10 + (s[4]-'0')) * 60; in mod_openssl_asn1_time_to_posix()
1507 if (*s == '-') offset = -offset; in mod_openssl_asn1_time_to_posix()
1509 else if (s[0] != '\0' && (s[0] != 'Z' || s[1] != '\0')) in mod_openssl_asn1_time_to_posix()
1513 && x.tm_hour == 23 && x.tm_min == 59 && x.tm_sec == 59 && s[0] == 'Z') in mod_openssl_asn1_time_to_posix()
1945 mod_openssl_ssl_conf_cmd (server *srv, plugin_config_socket *s);
1950 network_openssl_ssl_conf_cmd (server *srv, plugin_config_socket *s) in network_openssl_ssl_conf_cmd() argument
1957 SSL_CONF_CTX_set_ssl_ctx(cctx, s->ssl_ctx); in network_openssl_ssl_conf_cmd()
1965 array_get_element_klen(s->ssl_conf_cmd, in network_openssl_ssl_conf_cmd()
1969 array_get_buf_ptr(s->ssl_conf_cmd, CONST_STR_LEN("CipherString")); in network_openssl_ssl_conf_cmd()
1976 for (size_t i = 0; i < s->ssl_conf_cmd->used; ++i) { in network_openssl_ssl_conf_cmd()
1977 ds = (data_string *)s->ssl_conf_cmd->data[i]; in network_openssl_ssl_conf_cmd()
1983 if (level >= 0) SSL_CTX_set_security_level(s->ssl_ctx, level); in network_openssl_ssl_conf_cmd()
2010 return mod_openssl_ssl_conf_cmd(srv, s); in network_openssl_ssl_conf_cmd()
2014 UNUSED(s); in network_openssl_ssl_conf_cmd()
2090 mod_openssl_ssl_conf_dhparameters(server *srv, plugin_config_socket *s, const buffer *dhparameters) in mod_openssl_ssl_conf_dhparameters() argument
2112 SSL_CTX_set_tmp_dh(s->ssl_ctx, dh); in mod_openssl_ssl_conf_dhparameters()
2122 SSL_CTX_set_tmp_dh(s->ssl_ctx, dh); in mod_openssl_ssl_conf_dhparameters()
2146 || !SSL_CTX_set0_tmp_dh_pkey(s->ssl_ctx, dhpkey)) { in mod_openssl_ssl_conf_dhparameters()
2154 SSL_CTX_set_dh_auto(s->ssl_ctx, 1); in mod_openssl_ssl_conf_dhparameters()
2156 SSL_CTX_set_options(s->ssl_ctx, SSL_OP_SINGLE_DH_USE); in mod_openssl_ssl_conf_dhparameters()
2172 mod_openssl_ssl_conf_curves(server *srv, plugin_config_socket *s, const buffer *ssl_ec_curve) in mod_openssl_ssl_conf_curves() argument
2196 if (!SSL_CTX_set_ecdh_auto(s->ssl_ctx, 1)) { in mod_openssl_ssl_conf_curves()
2211 SSL_CTX_set_tmp_ecdh(s->ssl_ctx, ecdh); in mod_openssl_ssl_conf_curves()
2216 if (1 != SSL_CTX_set1_groups(s->ssl_ctx, &nid, 1)) { in mod_openssl_ssl_conf_curves()
2222 SSL_CTX_set_options(s->ssl_ctx, SSL_OP_SINGLE_ECDH_USE); in mod_openssl_ssl_conf_curves()
2227 UNUSED(s); in mod_openssl_ssl_conf_curves()
2236 network_init_ssl (server *srv, plugin_config_socket *s, plugin_data *p) in network_init_ssl() argument
2251 s->ssl_ctx = SSL_CTX_new(TLS_server_method()); in network_init_ssl()
2253 s->ssl_ctx = SSL_CTX_new(SSLv23_server_method()); in network_init_ssl()
2255 if (NULL == s->ssl_ctx) { in network_init_ssl()
2271 s->ssl_ctx,(const unsigned char*)CONST_STR_LEN("lighttpd"))){ in network_init_ssl()
2282 SSL_CTX_set_session_cache_mode(s->ssl_ctx, in network_init_ssl()
2287 SSL_CTX_set_options(s->ssl_ctx, ssloptions); in network_init_ssl()
2288 SSL_CTX_set_info_callback(s->ssl_ctx, ssl_info_callback); in network_init_ssl()
2293 & SSL_CTX_set_options(s->ssl_ctx, SSL_OP_NO_SSLv2)) in network_init_ssl()
2304 & SSL_CTX_set_options(s->ssl_ctx, SSL_OP_NO_SSLv3)) in network_init_ssl()
2312 if (s->ssl_cipher_list) { in network_init_ssl()
2314 if (SSL_CTX_set_cipher_list(s->ssl_ctx,s->ssl_cipher_list->ptr)!=1){ in network_init_ssl()
2320 if (s->ssl_honor_cipher_order) { in network_init_ssl()
2321 SSL_CTX_set_options(s->ssl_ctx,SSL_OP_CIPHER_SERVER_PREFERENCE); in network_init_ssl()
2326 if (s->ssl_honor_cipher_order) in network_init_ssl()
2327 SSL_CTX_set_options(s->ssl_ctx, SSL_OP_PRIORITIZE_CHACHA); in network_init_ssl()
2330 if (!mod_openssl_ssl_conf_dhparameters(srv, s, NULL)) in network_init_ssl()
2335 SSL_CTX_set_tlsext_ticket_key_cb(s->ssl_ctx, ssl_tlsext_ticket_key_cb); in network_init_ssl()
2337 SSL_CTX_set_tlsext_ticket_key_evp_cb(s->ssl_ctx, in network_init_ssl()
2344 SSL_CTX_set_tlsext_status_cb(s->ssl_ctx, ssl_tlsext_status_cb); in network_init_ssl()
2351 SSL_CTX_set_cert_cb(s->ssl_ctx, mod_openssl_cert_cb, NULL); in network_init_ssl()
2357 if (s->ssl_ca_file && s->ssl_ca_file->certs) { in network_init_ssl()
2358 if (!X509_STORE_up_ref(s->ssl_ca_file->certs)) in network_init_ssl()
2360 SSL_CTX_set_cert_store(s->ssl_ctx, s->ssl_ca_file->certs); in network_init_ssl()
2370 if (!mod_openssl_load_ca_files(s->ssl_ctx, p, srv)) in network_init_ssl()
2373 if (s->ssl_verifyclient) { in network_init_ssl()
2374 if (NULL == s->ssl_ca_file) { in network_init_ssl()
2386 STACK_OF(X509_NAME) * const cert_names = s->ssl_ca_dn_file in network_init_ssl()
2387 ? s->ssl_ca_dn_file in network_init_ssl()
2388 : s->ssl_ca_file->names; in network_init_ssl()
2389 SSL_CTX_set_client_CA_list(s->ssl_ctx, SSL_dup_CA_list(cert_names)); in network_init_ssl()
2391 if (s->ssl_verifyclient_enforce) { in network_init_ssl()
2394 SSL_CTX_set_verify(s->ssl_ctx, mode, verify_callback); in network_init_ssl()
2395 SSL_CTX_set_verify_depth(s->ssl_ctx, s->ssl_verifyclient_depth + 1); in network_init_ssl()
2396 if (s->ssl_ca_crl_file && !buffer_is_blank(s->ssl_ca_crl_file)) { in network_init_ssl()
2397 X509_STORE *store = SSL_CTX_get_cert_store(s->ssl_ctx); in network_init_ssl()
2398 if (!mod_openssl_load_cacrls(store, s->ssl_ca_crl_file, srv)) in network_init_ssl()
2403 if (1 != SSL_CTX_use_certificate_chain_file(s->ssl_ctx, in network_init_ssl()
2404 s->pc->ssl_pemfile->ptr)) { in network_init_ssl()
2407 s->pc->ssl_pemfile->ptr); in network_init_ssl()
2411 if (1 != SSL_CTX_use_PrivateKey(s->ssl_ctx, s->pc->ssl_pemfile_pkey)) { in network_init_ssl()
2414 s->pc->ssl_pemfile->ptr, s->pc->ssl_privkey->ptr); in network_init_ssl()
2418 if (SSL_CTX_check_private_key(s->ssl_ctx) != 1) { in network_init_ssl()
2422 s->pc->ssl_pemfile->ptr, s->pc->ssl_privkey->ptr); in network_init_ssl()
2432 SSL_CTX_set_default_read_ahead(s->ssl_ctx, s->ssl_read_ahead); in network_init_ssl()
2433 SSL_CTX_set_mode(s->ssl_ctx, SSL_CTX_get_mode(s->ssl_ctx) in network_init_ssl()
2440 SSL_CTX_set_client_hello_cb(s->ssl_ctx,mod_openssl_client_hello_cb,srv); in network_init_ssl()
2443 s->ssl_ctx, network_ssl_servername_callback) || in network_init_ssl()
2444 !SSL_CTX_set_tlsext_servername_arg(s->ssl_ctx, srv)) { in network_init_ssl()
2453 SSL_CTX_set_alpn_select_cb(s->ssl_ctx,mod_openssl_alpn_select_cb,NULL); in network_init_ssl()
2460 if (!SSL_CTX_set_min_proto_version(s->ssl_ctx, TLS1_2_VERSION)) in network_init_ssl()
2464 if (s->ssl_conf_cmd && s->ssl_conf_cmd->used) { in network_init_ssl()
2465 if (0 != network_openssl_ssl_conf_cmd(srv, s)) return -1; in network_init_ssl()
2468 SSL_CTX_set_options(s->ssl_ctx, SSL_OP_NO_COMPRESSION); in network_init_ssl()
2654 plugin_ssl_ctx * const s = p->ssl_ctxs + sidx; in mod_openssl_set_defaults_sockets() local
2655 *s = *p->ssl_ctxs;/*(copy struct of ssl_ctx from global scope)*/ in mod_openssl_set_defaults_sockets()
2669 plugin_ssl_ctx * const s = p->ssl_ctxs + sidx; in mod_openssl_set_defaults_sockets() local
2670 s->ssl_ctx = conf.ssl_ctx; in mod_openssl_set_defaults_sockets()
3308 plugin_ssl_ctx * const s = p->ssl_ctxs + srv_sock->sidx; in CONNECTION_FUNC() local
3309 hctx->ssl = SSL_new(s->ssl_ctx); in CONNECTION_FUNC()
3593 const char *s; in http_cgi_ssl_env() local
3596 s = SSL_get_version(hctx->ssl); in http_cgi_ssl_env()
3597 http_header_env_set(r, CONST_STR_LEN("SSL_PROTOCOL"), s, strlen(s)); in http_cgi_ssl_env()
3602 s = SSL_CIPHER_get_name(cipher); in http_cgi_ssl_env()
3603 http_header_env_set(r, CONST_STR_LEN("SSL_CIPHER"), s, strlen(s)); in http_cgi_ssl_env()
3754 mod_openssl_ssl_conf_cmd (server *srv, plugin_config_socket *s) in mod_openssl_ssl_conf_cmd() argument
3765 for (size_t i = 0; i < s->ssl_conf_cmd->used; ++i) { in mod_openssl_ssl_conf_cmd()
3766 data_string *ds = (data_string *)s->ssl_conf_cmd->data[i]; in mod_openssl_ssl_conf_cmd()
3776 if (!mod_openssl_ssl_conf_dhparameters(srv, s, &ds->value)) in mod_openssl_ssl_conf_cmd()
3807 SSL_CTX_set_options(s->ssl_ctx, in mod_openssl_ssl_conf_cmd()
3810 SSL_CTX_clear_options(s->ssl_ctx, in mod_openssl_ssl_conf_cmd()
3822 SSL_CTX_clear_options(s->ssl_ctx, in mod_openssl_ssl_conf_cmd()
3825 SSL_CTX_set_options(s->ssl_ctx, in mod_openssl_ssl_conf_cmd()
3833 SSL_CTX_clear_options(s->ssl_ctx, in mod_openssl_ssl_conf_cmd()
3836 SSL_CTX_set_options(s->ssl_ctx, in mod_openssl_ssl_conf_cmd()
3844 SSL_CTX_set_options(s->ssl_ctx, in mod_openssl_ssl_conf_cmd()
3847 SSL_CTX_clear_options(s->ssl_ctx, in mod_openssl_ssl_conf_cmd()
3849 s->ssl_honor_cipher_order = flag; in mod_openssl_ssl_conf_cmd()
3878 if (!SSL_CTX_set_min_proto_version(s->ssl_ctx, n)) in mod_openssl_ssl_conf_cmd()
3884 if (!SSL_CTX_set_max_proto_version(s->ssl_ctx, x)) in mod_openssl_ssl_conf_cmd()
3890 if (SSL_CTX_set_ciphersuites(s->ssl_ctx, ciphersuites->ptr) != 1) { in mod_openssl_ssl_conf_cmd()
3902 if (SSL_CTX_set_cipher_list(s->ssl_ctx, cipherstring->ptr) != 1) { in mod_openssl_ssl_conf_cmd()
3908 if (s->ssl_honor_cipher_order) in mod_openssl_ssl_conf_cmd()
3909 SSL_CTX_set_options(s->ssl_ctx, SSL_OP_CIPHER_SERVER_PREFERENCE); in mod_openssl_ssl_conf_cmd()
3913 if (!mod_openssl_ssl_conf_curves(srv, s, curves)) in mod_openssl_ssl_conf_cmd()