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
9aa7af2c
Commit
9aa7af2c
authored
Nov 22, 2012
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shrpx: Use SNI TLS extension in client mode
parent
d589f4c7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
2 deletions
+10
-2
src/shrpx_spdy_session.cc
src/shrpx_spdy_session.cc
+8
-0
src/shrpx_ssl.cc
src/shrpx_ssl.cc
+0
-2
src/shrpx_ssl.h
src/shrpx_ssl.h
+2
-0
No files found.
src/shrpx_spdy_session.cc
View file @
9aa7af2c
...
...
@@ -254,6 +254,14 @@ int SpdySession::initiate_connection()
<<
ERR_error_string
(
ERR_get_error
(),
NULL
);
return
-
1
;
}
if
(
!
ssl
::
numeric_host
(
get_config
()
->
downstream_host
))
{
// TLS extensions: SNI. There is no documentation about the return
// code for this function (actually this is macro wrapping SSL_ctrl
// at the time of this writing).
SSL_set_tlsext_host_name
(
ssl_
,
get_config
()
->
downstream_host
);
}
bev_
=
bufferevent_openssl_socket_new
(
evbase_
,
-
1
,
ssl_
,
BUFFEREVENT_SSL_CONNECTING
,
BEV_OPT_DEFER_CALLBACKS
);
...
...
src/shrpx_ssl.cc
View file @
9aa7af2c
...
...
@@ -250,7 +250,6 @@ ClientHandler* accept_ssl_connection(event_base *evbase, SSL_CTX *ssl_ctx,
}
}
namespace
{
bool
numeric_host
(
const
char
*
hostname
)
{
struct
addrinfo
hints
;
...
...
@@ -264,7 +263,6 @@ bool numeric_host(const char *hostname)
freeaddrinfo
(
res
);
return
true
;
}
}
// namespace
namespace
{
bool
tls_hostname_match
(
const
char
*
pattern
,
const
char
*
hostname
)
...
...
src/shrpx_ssl.h
View file @
9aa7af2c
...
...
@@ -46,6 +46,8 @@ ClientHandler* accept_ssl_connection(event_base *evbase, SSL_CTX *ssl_ctx,
evutil_socket_t
fd
,
sockaddr
*
addr
,
int
addrlen
);
bool
numeric_host
(
const
char
*
hostname
);
int
check_cert
(
SSL
*
ssl
);
void
setup_ssl_lock
();
...
...
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