comparison src/http/modules/ngx_http_ssl_module.c @ 8589:93be5658a250 quic

QUIC: reverted previous 3 commits. Changes were intended for the test repository.
author Vladimir Homutov <vl@nginx.com>
date Mon, 19 Oct 2020 10:32:53 +0300
parents 7621ffaa79b3
children 71b7453fb11f
comparison
equal deleted inserted replaced
8588:018baa412c0d 8589:93be5658a250
115 { ngx_string("ssl_password_file"), 115 { ngx_string("ssl_password_file"),
116 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_CONF_TAKE1, 116 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_CONF_TAKE1,
117 ngx_http_ssl_password_file, 117 ngx_http_ssl_password_file,
118 NGX_HTTP_SRV_CONF_OFFSET, 118 NGX_HTTP_SRV_CONF_OFFSET,
119 0, 119 0,
120 NULL },
121
122 { ngx_string("ssl_keys_file"),
123 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_CONF_TAKE1,
124 ngx_conf_set_str_slot,
125 NGX_HTTP_SRV_CONF_OFFSET,
126 offsetof(ngx_http_ssl_srv_conf_t, keys_file),
127 NULL }, 120 NULL },
128 121
129 { ngx_string("ssl_dhparam"), 122 { ngx_string("ssl_dhparam"),
130 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_CONF_TAKE1, 123 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_CONF_TAKE1,
131 ngx_conf_set_str_slot, 124 ngx_conf_set_str_slot,
610 * sscf->ecdh_curve = { 0, NULL }; 603 * sscf->ecdh_curve = { 0, NULL };
611 * sscf->client_certificate = { 0, NULL }; 604 * sscf->client_certificate = { 0, NULL };
612 * sscf->trusted_certificate = { 0, NULL }; 605 * sscf->trusted_certificate = { 0, NULL };
613 * sscf->crl = { 0, NULL }; 606 * sscf->crl = { 0, NULL };
614 * sscf->ciphers = { 0, NULL }; 607 * sscf->ciphers = { 0, NULL };
615 * sscf->keys_file = { 0, NULL };
616 * sscf->shm_zone = NULL; 608 * sscf->shm_zone = NULL;
617 * sscf->ocsp_responder = { 0, NULL }; 609 * sscf->ocsp_responder = { 0, NULL };
618 * sscf->stapling_file = { 0, NULL }; 610 * sscf->stapling_file = { 0, NULL };
619 * sscf->stapling_responder = { 0, NULL }; 611 * sscf->stapling_responder = { 0, NULL };
620 */ 612 */
682 ngx_conf_merge_ptr_value(conf->certificate_keys, prev->certificate_keys, 674 ngx_conf_merge_ptr_value(conf->certificate_keys, prev->certificate_keys,
683 NULL); 675 NULL);
684 676
685 ngx_conf_merge_ptr_value(conf->passwords, prev->passwords, NULL); 677 ngx_conf_merge_ptr_value(conf->passwords, prev->passwords, NULL);
686 678
687 ngx_conf_merge_str_value(conf->keys_file, prev->keys_file, "");
688
689 ngx_conf_merge_str_value(conf->dhparam, prev->dhparam, ""); 679 ngx_conf_merge_str_value(conf->dhparam, prev->dhparam, "");
690 680
691 ngx_conf_merge_str_value(conf->client_certificate, prev->client_certificate, 681 ngx_conf_merge_str_value(conf->client_certificate, prev->client_certificate,
692 ""); 682 "");
693 ngx_conf_merge_str_value(conf->trusted_certificate, 683 ngx_conf_merge_str_value(conf->trusted_certificate,
918 908
919 if (ngx_ssl_session_ticket_keys(cf, &conf->ssl, conf->session_ticket_keys) 909 if (ngx_ssl_session_ticket_keys(cf, &conf->ssl, conf->session_ticket_keys)
920 != NGX_OK) 910 != NGX_OK)
921 { 911 {
922 return NGX_CONF_ERROR; 912 return NGX_CONF_ERROR;
923 }
924
925 if (conf->keys_file.len) {
926
927 conf->ssl.keylog = ngx_conf_open_file(cf->cycle, &conf->keys_file);
928
929 if (conf->ssl.keylog == NULL) {
930 return NGX_CONF_ERROR;
931 }
932
933 SSL_CTX_set_keylog_callback(conf->ssl.ctx, ngx_ssl_keylogger);
934 } 913 }
935 914
936 if (conf->stapling) { 915 if (conf->stapling) {
937 916
938 if (ngx_ssl_stapling(cf, &conf->ssl, &conf->stapling_file, 917 if (ngx_ssl_stapling(cf, &conf->ssl, &conf->stapling_file,