Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
nghttp2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
nghttp2
Commits
660bc389
Commit
660bc389
authored
Feb 14, 2016
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nghttpx: Use ImmutableString for fetch_ocsp_response_file
parent
bfc26e82
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
9 deletions
+9
-9
src/shrpx.cc
src/shrpx.cc
+5
-6
src/shrpx_config.cc
src/shrpx_config.cc
+1
-1
src/shrpx_config.h
src/shrpx_config.h
+1
-1
src/shrpx_connection_handler.cc
src/shrpx_connection_handler.cc
+2
-1
No files found.
src/shrpx.cc
View file @
660bc389
...
...
@@ -1067,8 +1067,7 @@ void fill_default_config() {
auto
&
ocspconf
=
tlsconf
.
ocsp
;
// ocsp update interval = 14400 secs = 4 hours, borrowed from h2o
ocspconf
.
update_interval
=
4
_h
;
ocspconf
.
fetch_ocsp_response_file
=
strcopy
(
PKGDATADIR
"/fetch-ocsp-response"
);
ocspconf
.
fetch_ocsp_response_file
=
PKGDATADIR
"/fetch-ocsp-response"
;
}
{
...
...
@@ -1579,8 +1578,8 @@ SSL/TLS:
--fetch-ocsp-response-file=<PATH>
Path to fetch-ocsp-response script file. It should be
absolute path.
Default: )"
<<
get_config
()
->
tls
.
ocsp
.
fetch_ocsp_response_file
.
get
()
<<
R"(
Default: )"
<<
get_config
()
->
tls
.
ocsp
.
fetch_ocsp_response_file
<<
R"(
--ocsp-update-interval=<DURATION>
Set interval to update OCSP response cache.
Default: )"
...
...
@@ -2094,10 +2093,10 @@ void process_options(
if
(
!
upstreamconf
.
no_tls
&&
!
tlsconf
.
ocsp
.
disabled
)
{
struct
stat
buf
;
if
(
stat
(
tlsconf
.
ocsp
.
fetch_ocsp_response_file
.
get
(),
&
buf
)
!=
0
)
{
if
(
stat
(
tlsconf
.
ocsp
.
fetch_ocsp_response_file
.
c_str
(),
&
buf
)
!=
0
)
{
tlsconf
.
ocsp
.
disabled
=
true
;
LOG
(
WARN
)
<<
"--fetch-ocsp-response-file: "
<<
tlsconf
.
ocsp
.
fetch_ocsp_response_file
.
get
()
<<
tlsconf
.
ocsp
.
fetch_ocsp_response_file
<<
" not found. OCSP stapling has been disabled."
;
}
}
...
...
src/shrpx_config.cc
View file @
660bc389
...
...
@@ -2086,7 +2086,7 @@ int parse_config(const char *opt, const char *optarg,
return
parse_uint
(
&
mod_config
()
->
http2
.
downstream
.
connections_per_worker
,
opt
,
optarg
);
case
SHRPX_OPTID_FETCH_OCSP_RESPONSE_FILE
:
mod_config
()
->
tls
.
ocsp
.
fetch_ocsp_response_file
=
strcopy
(
optarg
)
;
mod_config
()
->
tls
.
ocsp
.
fetch_ocsp_response_file
=
optarg
;
return
0
;
case
SHRPX_OPTID_OCSP_UPDATE_INTERVAL
:
...
...
src/shrpx_config.h
View file @
660bc389
...
...
@@ -394,7 +394,7 @@ struct TLSConfig {
// OCSP realted configurations
struct
{
ev_tstamp
update_interval
;
std
::
unique_ptr
<
char
[]
>
fetch_ocsp_response_file
;
ImmutableString
fetch_ocsp_response_file
;
bool
disabled
;
}
ocsp
;
...
...
src/shrpx_connection_handler.cc
View file @
660bc389
...
...
@@ -463,7 +463,8 @@ int ConnectionHandler::start_ocsp_update(const char *cert_file) {
assert
(
!
ev_is_active
(
&
ocsp_
.
chldev
));
char
*
const
argv
[]
=
{
const_cast
<
char
*>
(
get_config
()
->
tls
.
ocsp
.
fetch_ocsp_response_file
.
get
()),
const_cast
<
char
*>
(
get_config
()
->
tls
.
ocsp
.
fetch_ocsp_response_file
.
c_str
()),
const_cast
<
char
*>
(
cert_file
),
nullptr
};
char
*
const
envp
[]
=
{
nullptr
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment