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
301df2a8
Commit
301df2a8
authored
Jun 22, 2015
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
src: Disable SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS
parent
f3b7f414
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
40 additions
and
30 deletions
+40
-30
src/HttpServer.cc
src/HttpServer.cc
+7
-6
src/asio_server_tls_context.cc
src/asio_server_tls_context.cc
+7
-5
src/h2load.cc
src/h2load.cc
+5
-4
src/nghttp.cc
src/nghttp.cc
+6
-4
src/shrpx_ssl.cc
src/shrpx_ssl.cc
+15
-11
No files found.
src/HttpServer.cc
View file @
301df2a8
...
...
@@ -1768,12 +1768,13 @@ int HttpServer::run() {
return
-
1
;
}
SSL_CTX_set_options
(
ssl_ctx
,
SSL_OP_ALL
|
SSL_OP_NO_SSLv2
|
SSL_OP_NO_SSLv3
|
SSL_OP_NO_COMPRESSION
|
SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION
|
SSL_OP_SINGLE_ECDH_USE
|
SSL_OP_NO_TICKET
|
SSL_OP_CIPHER_SERVER_PREFERENCE
);
auto
ssl_opts
=
(
SSL_OP_ALL
&
~
SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS
)
|
SSL_OP_NO_SSLv2
|
SSL_OP_NO_SSLv3
|
SSL_OP_NO_COMPRESSION
|
SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION
|
SSL_OP_SINGLE_ECDH_USE
|
SSL_OP_NO_TICKET
|
SSL_OP_CIPHER_SERVER_PREFERENCE
;
SSL_CTX_set_options
(
ssl_ctx
,
ssl_opts
);
SSL_CTX_set_mode
(
ssl_ctx
,
SSL_MODE_AUTO_RETRY
);
SSL_CTX_set_mode
(
ssl_ctx
,
SSL_MODE_RELEASE_BUFFERS
);
...
...
src/asio_server_tls_context.cc
View file @
301df2a8
...
...
@@ -49,11 +49,13 @@ configure_tls_context_easy(boost::system::error_code &ec,
auto
ctx
=
tls_context
.
native_handle
();
SSL_CTX_set_options
(
ctx
,
SSL_OP_ALL
|
SSL_OP_NO_SSLv2
|
SSL_OP_NO_SSLv3
|
SSL_OP_NO_COMPRESSION
|
SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION
|
SSL_OP_SINGLE_ECDH_USE
|
SSL_OP_NO_TICKET
|
SSL_OP_CIPHER_SERVER_PREFERENCE
);
auto
ssl_opts
=
(
SSL_OP_ALL
&
~
SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS
)
|
SSL_OP_NO_SSLv2
|
SSL_OP_NO_SSLv3
|
SSL_OP_NO_COMPRESSION
|
SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION
|
SSL_OP_SINGLE_ECDH_USE
|
SSL_OP_NO_TICKET
|
SSL_OP_CIPHER_SERVER_PREFERENCE
;
SSL_CTX_set_options
(
ctx
,
ssl_opts
);
SSL_CTX_set_mode
(
ctx
,
SSL_MODE_AUTO_RETRY
);
SSL_CTX_set_mode
(
ctx
,
SSL_MODE_RELEASE_BUFFERS
);
...
...
src/h2load.cc
View file @
301df2a8
...
...
@@ -1277,10 +1277,11 @@ int main(int argc, char **argv) {
exit
(
EXIT_FAILURE
);
}
SSL_CTX_set_options
(
ssl_ctx
,
SSL_OP_ALL
|
SSL_OP_NO_SSLv2
|
SSL_OP_NO_SSLv3
|
SSL_OP_NO_COMPRESSION
|
SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION
);
auto
ssl_opts
=
(
SSL_OP_ALL
&
~
SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS
)
|
SSL_OP_NO_SSLv2
|
SSL_OP_NO_SSLv3
|
SSL_OP_NO_COMPRESSION
|
SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION
;
SSL_CTX_set_options
(
ssl_ctx
,
ssl_opts
);
SSL_CTX_set_mode
(
ssl_ctx
,
SSL_MODE_AUTO_RETRY
);
SSL_CTX_set_mode
(
ssl_ctx
,
SSL_MODE_RELEASE_BUFFERS
);
...
...
src/nghttp.cc
View file @
301df2a8
...
...
@@ -2005,10 +2005,12 @@ int communicate(
result
=
-
1
;
goto
fin
;
}
SSL_CTX_set_options
(
ssl_ctx
,
SSL_OP_ALL
|
SSL_OP_NO_SSLv2
|
SSL_OP_NO_SSLv3
|
SSL_OP_NO_COMPRESSION
|
SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION
);
auto
ssl_opts
=
(
SSL_OP_ALL
&
~
SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS
)
|
SSL_OP_NO_SSLv2
|
SSL_OP_NO_SSLv3
|
SSL_OP_NO_COMPRESSION
|
SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION
;
SSL_CTX_set_options
(
ssl_ctx
,
ssl_opts
);
SSL_CTX_set_mode
(
ssl_ctx
,
SSL_MODE_AUTO_RETRY
);
SSL_CTX_set_mode
(
ssl_ctx
,
SSL_MODE_RELEASE_BUFFERS
);
if
(
SSL_CTX_set_cipher_list
(
ssl_ctx
,
CIPHER_LIST
)
==
0
)
{
...
...
src/shrpx_ssl.cc
View file @
301df2a8
...
...
@@ -338,12 +338,14 @@ SSL_CTX *create_ssl_context(const char *private_key_file,
DIE
();
}
SSL_CTX_set_options
(
ssl_ctx
,
SSL_OP_ALL
|
SSL_OP_NO_SSLv2
|
SSL_OP_NO_SSLv3
|
SSL_OP_NO_COMPRESSION
|
SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION
|
SSL_OP_SINGLE_ECDH_USE
|
SSL_OP_SINGLE_DH_USE
|
SSL_OP_CIPHER_SERVER_PREFERENCE
|
get_config
()
->
tls_proto_mask
);
auto
ssl_opts
=
(
SSL_OP_ALL
&
~
SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS
)
|
SSL_OP_NO_SSLv2
|
SSL_OP_NO_SSLv3
|
SSL_OP_NO_COMPRESSION
|
SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION
|
SSL_OP_SINGLE_ECDH_USE
|
SSL_OP_SINGLE_DH_USE
|
SSL_OP_CIPHER_SERVER_PREFERENCE
|
get_config
()
->
tls_proto_mask
;
SSL_CTX_set_options
(
ssl_ctx
,
ssl_opts
);
const
unsigned
char
sid_ctx
[]
=
"shrpx"
;
SSL_CTX_set_session_id_context
(
ssl_ctx
,
sid_ctx
,
sizeof
(
sid_ctx
)
-
1
);
...
...
@@ -493,11 +495,13 @@ SSL_CTX *create_ssl_client_context() {
LOG
(
FATAL
)
<<
ERR_error_string
(
ERR_get_error
(),
nullptr
);
DIE
();
}
SSL_CTX_set_options
(
ssl_ctx
,
SSL_OP_ALL
|
SSL_OP_NO_SSLv2
|
SSL_OP_NO_SSLv3
|
SSL_OP_NO_COMPRESSION
|
SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION
|
get_config
()
->
tls_proto_mask
);
auto
ssl_opts
=
(
SSL_OP_ALL
&
~
SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS
)
|
SSL_OP_NO_SSLv2
|
SSL_OP_NO_SSLv3
|
SSL_OP_NO_COMPRESSION
|
SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION
|
get_config
()
->
tls_proto_mask
;
SSL_CTX_set_options
(
ssl_ctx
,
ssl_opts
);
const
char
*
ciphers
;
if
(
get_config
()
->
ciphers
)
{
...
...
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