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
a82b7f09
Commit
a82b7f09
authored
Apr 26, 2014
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nghttpx: Drop HTTP/2 backend connection unless TLSv1.2 or TLSv1.1 was negotiated
parent
75bfbc94
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
3 deletions
+19
-3
src/shrpx_http2_session.cc
src/shrpx_http2_session.cc
+17
-3
src/shrpx_http2_session.h
src/shrpx_http2_session.h
+2
-0
No files found.
src/shrpx_http2_session.cc
View file @
a82b7f09
...
@@ -257,12 +257,21 @@ void eventcb(bufferevent *bev, short events, void *ptr)
...
@@ -257,12 +257,21 @@ void eventcb(bufferevent *bev, short events, void *ptr)
SSLOG
(
INFO
,
http2session
)
<<
"Connection established"
;
SSLOG
(
INFO
,
http2session
)
<<
"Connection established"
;
}
}
http2session
->
set_state
(
Http2Session
::
CONNECTED
);
http2session
->
set_state
(
Http2Session
::
CONNECTED
);
if
((
!
get_config
()
->
downstream_no_tls
&&
if
(
!
get_config
()
->
downstream_no_tls
)
{
!
get_config
()
->
insecure
&&
http2session
->
check_cert
()
!=
0
)
||
if
(
!
ssl
::
check_http2_requirement
(
http2session
->
get_ssl
())
||
http2session
->
on_connect
()
!=
0
)
{
(
!
get_config
()
->
insecure
&&
http2session
->
check_cert
()
!=
0
))
{
http2session
->
disconnect
();
return
;
}
}
if
(
http2session
->
on_connect
()
!=
0
)
{
http2session
->
disconnect
();
http2session
->
disconnect
();
return
;
return
;
}
}
int
fd
=
bufferevent_getfd
(
bev
);
int
fd
=
bufferevent_getfd
(
bev
);
int
val
=
1
;
int
val
=
1
;
if
(
setsockopt
(
fd
,
IPPROTO_TCP
,
TCP_NODELAY
,
if
(
setsockopt
(
fd
,
IPPROTO_TCP
,
TCP_NODELAY
,
...
@@ -1384,4 +1393,9 @@ size_t Http2Session::get_outbuf_length() const
...
@@ -1384,4 +1393,9 @@ size_t Http2Session::get_outbuf_length() const
}
}
}
}
SSL
*
Http2Session
::
get_ssl
()
const
{
return
ssl_
;
}
}
// namespace shrpx
}
// namespace shrpx
src/shrpx_http2_session.h
View file @
a82b7f09
...
@@ -106,6 +106,8 @@ public:
...
@@ -106,6 +106,8 @@ public:
size_t
get_outbuf_length
()
const
;
size_t
get_outbuf_length
()
const
;
SSL
*
get_ssl
()
const
;
enum
{
enum
{
// Disconnected
// Disconnected
DISCONNECTED
,
DISCONNECTED
,
...
...
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