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
74c2f125
Commit
74c2f125
authored
May 25, 2017
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nghttpx: Add --no-verify-ocsp to disable OCSP response verification
parent
1428a5e3
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
26 additions
and
1 deletion
+26
-1
gennghttpxfun.py
gennghttpxfun.py
+1
-0
src/shrpx.cc
src/shrpx.cc
+8
-0
src/shrpx_config.cc
src/shrpx_config.cc
+9
-0
src/shrpx_config.h
src/shrpx_config.h
+3
-0
src/shrpx_connection_handler.cc
src/shrpx_connection_handler.cc
+5
-1
No files found.
gennghttpxfun.py
View file @
74c2f125
...
...
@@ -167,6 +167,7 @@ OPTIONS = [
"no-add-x-forwarded-proto"
,
"no-strip-incoming-x-forwarded-proto"
,
"ocsp-startup"
,
"no-verify-ocsp"
,
]
LOGVARS
=
[
...
...
src/shrpx.cc
View file @
74c2f125
...
...
@@ -2240,6 +2240,8 @@ SSL/TLS:
the attempts fail. This feature is useful if OCSP
responses must be available before accepting
connections.
--no-verify-ocsp
nghttpx does not verify OCSP response.
--no-ocsp Disable OCSP stapling.
--tls-session-cache-memcached=<HOST>,<PORT>[;tls]
Specify address of memcached server to store session
...
...
@@ -3191,6 +3193,7 @@ int main(int argc, char **argv) {
{
SHRPX_OPT_BACKEND_NO_TLS
.
c_str
(),
no_argument
,
&
flag
,
27
},
{
SHRPX_OPT_OCSP_STARTUP
.
c_str
(),
no_argument
,
&
flag
,
28
},
{
SHRPX_OPT_FRONTEND_NO_TLS
.
c_str
(),
no_argument
,
&
flag
,
29
},
{
SHRPX_OPT_NO_VERIFY_OCSP
.
c_str
(),
no_argument
,
&
flag
,
30
},
{
SHRPX_OPT_BACKEND_TLS_SNI_FIELD
.
c_str
(),
required_argument
,
&
flag
,
31
},
{
SHRPX_OPT_DH_PARAM_FILE
.
c_str
(),
required_argument
,
&
flag
,
33
},
{
SHRPX_OPT_READ_RATE
.
c_str
(),
required_argument
,
&
flag
,
34
},
...
...
@@ -3550,6 +3553,11 @@ int main(int argc, char **argv) {
cmdcfgs
.
emplace_back
(
SHRPX_OPT_FRONTEND_NO_TLS
,
StringRef
::
from_lit
(
"yes"
));
break
;
case
30
:
// --no-verify-ocsp
cmdcfgs
.
emplace_back
(
SHRPX_OPT_NO_VERIFY_OCSP
,
StringRef
::
from_lit
(
"yes"
));
break
;
case
31
:
// --backend-tls-sni-field
cmdcfgs
.
emplace_back
(
SHRPX_OPT_BACKEND_TLS_SNI_FIELD
,
...
...
src/shrpx_config.cc
View file @
74c2f125
...
...
@@ -1651,6 +1651,11 @@ int option_lookup_token(const char *name, size_t namelen) {
return
SHRPX_OPTID_NO_SERVER_PUSH
;
}
break
;
case
'p'
:
if
(
util
::
strieq_l
(
"no-verify-ocs"
,
name
,
13
))
{
return
SHRPX_OPTID_NO_VERIFY_OCSP
;
}
break
;
case
's'
:
if
(
util
::
strieq_l
(
"backend-no-tl"
,
name
,
13
))
{
return
SHRPX_OPTID_BACKEND_NO_TLS
;
...
...
@@ -3429,6 +3434,10 @@ int parse_config(Config *config, int optid, const StringRef &opt,
case
SHRPX_OPTID_OCSP_STARTUP
:
config
->
tls
.
ocsp
.
startup
=
util
::
strieq_l
(
"yes"
,
optarg
);
return
0
;
case
SHRPX_OPTID_NO_VERIFY_OCSP
:
config
->
tls
.
ocsp
.
no_verify
=
util
::
strieq_l
(
"yes"
,
optarg
);
return
0
;
case
SHRPX_OPTID_CONF
:
LOG
(
WARN
)
<<
"conf: ignored"
;
...
...
src/shrpx_config.h
View file @
74c2f125
...
...
@@ -342,6 +342,7 @@ constexpr auto SHRPX_OPT_NO_ADD_X_FORWARDED_PROTO =
constexpr
auto
SHRPX_OPT_NO_STRIP_INCOMING_X_FORWARDED_PROTO
=
StringRef
::
from_lit
(
"no-strip-incoming-x-forwarded-proto"
);
constexpr
auto
SHRPX_OPT_OCSP_STARTUP
=
StringRef
::
from_lit
(
"ocsp-startup"
);
constexpr
auto
SHRPX_OPT_NO_VERIFY_OCSP
=
StringRef
::
from_lit
(
"no-verify-ocsp"
);
constexpr
size_t
SHRPX_OBFUSCATED_NODE_LENGTH
=
8
;
...
...
@@ -563,6 +564,7 @@ struct TLSConfig {
StringRef
fetch_ocsp_response_file
;
bool
disabled
;
bool
startup
;
bool
no_verify
;
}
ocsp
;
// Client verification configurations
...
...
@@ -1045,6 +1047,7 @@ enum {
SHRPX_OPTID_NO_SERVER_PUSH
,
SHRPX_OPTID_NO_SERVER_REWRITE
,
SHRPX_OPTID_NO_STRIP_INCOMING_X_FORWARDED_PROTO
,
SHRPX_OPTID_NO_VERIFY_OCSP
,
SHRPX_OPTID_NO_VIA
,
SHRPX_OPTID_NPN_LIST
,
SHRPX_OPTID_OCSP_STARTUP
,
...
...
src/shrpx_connection_handler.cc
View file @
74c2f125
...
...
@@ -620,7 +620,11 @@ void ConnectionHandler::handle_ocsp_complete() {
<<
" finished successfully"
;
}
if
(
tls
::
verify_ocsp_response
(
ssl_ctx
,
ocsp_
.
resp
.
data
(),
auto
config
=
get_config
();
auto
&
tlsconf
=
config
->
tls
;
if
(
tlsconf
.
ocsp
.
no_verify
||
tls
::
verify_ocsp_response
(
ssl_ctx
,
ocsp_
.
resp
.
data
(),
ocsp_
.
resp
.
size
())
==
0
)
{
#ifndef OPENSSL_IS_BORINGSSL
#ifdef HAVE_ATOMIC_STD_SHARED_PTR
...
...
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