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
e65e7711
Commit
e65e7711
authored
6 years ago
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add comment on #endif
parent
636ef51b
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
18 additions
and
18 deletions
+18
-18
examples/client.c
examples/client.c
+1
-1
examples/libevent-client.c
examples/libevent-client.c
+2
-2
examples/libevent-server.c
examples/libevent-server.c
+2
-2
src/HttpServer.cc
src/HttpServer.cc
+2
-2
src/asio_common.cc
src/asio_common.cc
+1
-1
src/h2load.cc
src/h2load.cc
+2
-2
src/nghttp.cc
src/nghttp.cc
+2
-2
src/shrpx_client_handler.cc
src/shrpx_client_handler.cc
+1
-1
src/shrpx_connection.cc
src/shrpx_connection.cc
+1
-1
src/shrpx_http2_session.cc
src/shrpx_http2_session.cc
+1
-1
src/shrpx_live_check.cc
src/shrpx_live_check.cc
+1
-1
src/shrpx_tls.cc
src/shrpx_tls.cc
+2
-2
No files found.
examples/client.c
View file @
e65e7711
...
...
@@ -379,7 +379,7 @@ static void init_ssl_ctx(SSL_CTX *ssl_ctx) {
/* Set NPN callback */
#ifndef OPENSSL_NO_NEXTPROTONEG
SSL_CTX_set_next_proto_select_cb
(
ssl_ctx
,
select_next_proto_cb
,
NULL
);
#endif
#endif
/* !OPENSSL_NO_NEXTPROTONEG */
}
static
void
ssl_handshake
(
SSL
*
ssl
,
int
fd
)
{
...
...
This diff is collapsed.
Click to expand it.
examples/libevent-client.c
View file @
e65e7711
...
...
@@ -339,7 +339,7 @@ static SSL_CTX *create_ssl_ctx(void) {
SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION
);
#ifndef OPENSSL_NO_NEXTPROTONEG
SSL_CTX_set_next_proto_select_cb
(
ssl_ctx
,
select_next_proto_cb
,
NULL
);
#endif
#endif
/* !OPENSSL_NO_NEXTPROTONEG */
#if OPENSSL_VERSION_NUMBER >= 0x10002000L
SSL_CTX_set_alpn_protos
(
ssl_ctx
,
(
const
unsigned
char
*
)
"
\x02
h2"
,
3
);
...
...
@@ -510,7 +510,7 @@ static void eventcb(struct bufferevent *bev, short events, void *ptr) {
#ifndef OPENSSL_NO_NEXTPROTONEG
SSL_get0_next_proto_negotiated
(
ssl
,
&
alpn
,
&
alpnlen
);
#endif
#endif
/* !OPENSSL_NO_NEXTPROTONEG */
#if OPENSSL_VERSION_NUMBER >= 0x10002000L
if
(
alpn
==
NULL
)
{
SSL_get0_alpn_selected
(
ssl
,
&
alpn
,
&
alpnlen
);
...
...
This diff is collapsed.
Click to expand it.
examples/libevent-server.c
View file @
e65e7711
...
...
@@ -176,7 +176,7 @@ static SSL_CTX *create_ssl_ctx(const char *key_file, const char *cert_file) {
#ifndef OPENSSL_NO_NEXTPROTONEG
SSL_CTX_set_next_protos_advertised_cb
(
ssl_ctx
,
next_proto_cb
,
NULL
);
#endif
#endif
/* !OPENSSL_NO_NEXTPROTONEG */
#if OPENSSL_VERSION_NUMBER >= 0x10002000L
SSL_CTX_set_alpn_select_cb
(
ssl_ctx
,
alpn_select_proto_cb
,
NULL
);
...
...
@@ -696,7 +696,7 @@ static void eventcb(struct bufferevent *bev, short events, void *ptr) {
#ifndef OPENSSL_NO_NEXTPROTONEG
SSL_get0_next_proto_negotiated
(
ssl
,
&
alpn
,
&
alpnlen
);
#endif
#endif
/* !OPENSSL_NO_NEXTPROTONEG */
#if OPENSSL_VERSION_NUMBER >= 0x10002000L
if
(
alpn
==
NULL
)
{
SSL_get0_alpn_selected
(
ssl
,
&
alpn
,
&
alpnlen
);
...
...
This diff is collapsed.
Click to expand it.
src/HttpServer.cc
View file @
e65e7711
...
...
@@ -890,7 +890,7 @@ int Http2Handler::verify_npn_result() {
// Check the negotiated protocol in NPN or ALPN
#ifndef OPENSSL_NO_NEXTPROTONEG
SSL_get0_next_proto_negotiated
(
ssl_
,
&
next_proto
,
&
next_proto_len
);
#endif
#endif
// !OPENSSL_NO_NEXTPROTONEG
for
(
int
i
=
0
;
i
<
2
;
++
i
)
{
if
(
next_proto
)
{
auto
proto
=
StringRef
{
next_proto
,
next_proto_len
};
...
...
@@ -2211,7 +2211,7 @@ int HttpServer::run() {
#ifndef OPENSSL_NO_NEXTPROTONEG
SSL_CTX_set_next_protos_advertised_cb
(
ssl_ctx
,
next_proto_cb
,
&
next_proto
);
#endif
#endif
// !OPENSSL_NO_NEXTPROTONEG
#if OPENSSL_VERSION_NUMBER >= 0x10002000L
// ALPN selection callback
SSL_CTX_set_alpn_select_cb
(
ssl_ctx
,
alpn_select_proto_cb
,
this
);
...
...
This diff is collapsed.
Click to expand it.
src/asio_common.cc
View file @
e65e7711
...
...
@@ -179,7 +179,7 @@ bool tls_h2_negotiated(ssl_socket &socket) {
#ifndef OPENSSL_NO_NEXTPROTONEG
SSL_get0_next_proto_negotiated
(
ssl
,
&
next_proto
,
&
next_proto_len
);
#endif
#endif
// !OPENSSL_NO_NEXTPROTONEG
#if OPENSSL_VERSION_NUMBER >= 0x10002000L
if
(
next_proto
==
nullptr
)
{
SSL_get0_alpn_selected
(
ssl
,
&
next_proto
,
&
next_proto_len
);
...
...
This diff is collapsed.
Click to expand it.
src/h2load.cc
View file @
e65e7711
...
...
@@ -859,7 +859,7 @@ int Client::connection_made() {
#ifndef OPENSSL_NO_NEXTPROTONEG
SSL_get0_next_proto_negotiated
(
ssl
,
&
next_proto
,
&
next_proto_len
);
#endif
#endif
// !OPENSSL_NO_NEXTPROTONEG
#if OPENSSL_VERSION_NUMBER >= 0x10002000L
if
(
next_proto
==
nullptr
)
{
SSL_get0_alpn_selected
(
ssl
,
&
next_proto
,
&
next_proto_len
);
...
...
@@ -2406,7 +2406,7 @@ int main(int argc, char **argv) {
#ifndef OPENSSL_NO_NEXTPROTONEG
SSL_CTX_set_next_proto_select_cb
(
ssl_ctx
,
client_select_next_proto_cb
,
nullptr
);
#endif
#endif
// !OPENSSL_NO_NEXTPROTONEG
#if OPENSSL_VERSION_NUMBER >= 0x10002000L
std
::
vector
<
unsigned
char
>
proto_list
;
...
...
This diff is collapsed.
Click to expand it.
src/nghttp.cc
View file @
e65e7711
...
...
@@ -1097,7 +1097,7 @@ int HttpClient::connection_made() {
unsigned
int
next_proto_len
;
#ifndef OPENSSL_NO_NEXTPROTONEG
SSL_get0_next_proto_negotiated
(
ssl
,
&
next_proto
,
&
next_proto_len
);
#endif
#endif
// !OPENSSL_NO_NEXTPROTONEG
for
(
int
i
=
0
;
i
<
2
;
++
i
)
{
if
(
next_proto
)
{
auto
proto
=
StringRef
{
next_proto
,
next_proto_len
};
...
...
@@ -2315,7 +2315,7 @@ int communicate(
#ifndef OPENSSL_NO_NEXTPROTONEG
SSL_CTX_set_next_proto_select_cb
(
ssl_ctx
,
client_select_next_proto_cb
,
nullptr
);
#endif
#endif
// !OPENSSL_NO_NEXTPROTONEG
#if OPENSSL_VERSION_NUMBER >= 0x10002000L
auto
proto_list
=
util
::
get_default_alpn
();
...
...
This diff is collapsed.
Click to expand it.
src/shrpx_client_handler.cc
View file @
e65e7711
...
...
@@ -551,7 +551,7 @@ int ClientHandler::validate_next_proto() {
#ifndef OPENSSL_NO_NEXTPROTONEG
SSL_get0_next_proto_negotiated
(
conn_
.
tls
.
ssl
,
&
next_proto
,
&
next_proto_len
);
#endif
#endif
// !OPENSSL_NO_NEXTPROTONEG
#if OPENSSL_VERSION_NUMBER >= 0x10002000L
if
(
next_proto
==
nullptr
)
{
SSL_get0_alpn_selected
(
conn_
.
tls
.
ssl
,
&
next_proto
,
&
next_proto_len
);
...
...
This diff is collapsed.
Click to expand it.
src/shrpx_connection.cc
View file @
e65e7711
...
...
@@ -525,7 +525,7 @@ int Connection::check_http2_requirement() {
#ifndef OPENSSL_NO_NEXTPROTONEG
SSL_get0_next_proto_negotiated
(
tls
.
ssl
,
&
next_proto
,
&
next_proto_len
);
#endif
#endif
// !OPENSSL_NO_NEXTPROTONEG
#if OPENSSL_VERSION_NUMBER >= 0x10002000L
if
(
next_proto
==
nullptr
)
{
SSL_get0_alpn_selected
(
tls
.
ssl
,
&
next_proto
,
&
next_proto_len
);
...
...
This diff is collapsed.
Click to expand it.
src/shrpx_http2_session.cc
View file @
e65e7711
...
...
@@ -1651,7 +1651,7 @@ int Http2Session::connection_made() {
#ifndef OPENSSL_NO_NEXTPROTONEG
SSL_get0_next_proto_negotiated
(
conn_
.
tls
.
ssl
,
&
next_proto
,
&
next_proto_len
);
#endif
#endif
// !OPENSSL_NO_NEXTPROTONEG
#if OPENSSL_VERSION_NUMBER >= 0x10002000L
if
(
!
next_proto
)
{
SSL_get0_alpn_selected
(
conn_
.
tls
.
ssl
,
&
next_proto
,
&
next_proto_len
);
...
...
This diff is collapsed.
Click to expand it.
src/shrpx_live_check.cc
View file @
e65e7711
...
...
@@ -408,7 +408,7 @@ int LiveCheck::tls_handshake() {
#ifndef OPENSSL_NO_NEXTPROTONEG
SSL_get0_next_proto_negotiated
(
conn_
.
tls
.
ssl
,
&
next_proto
,
&
next_proto_len
);
#endif
#endif
// !OPENSSL_NO_NEXTPROTONEG
#if OPENSSL_VERSION_NUMBER >= 0x10002000L
if
(
next_proto
==
nullptr
)
{
SSL_get0_alpn_selected
(
conn_
.
tls
.
ssl
,
&
next_proto
,
&
next_proto_len
);
...
...
This diff is collapsed.
Click to expand it.
src/shrpx_tls.cc
View file @
e65e7711
...
...
@@ -927,7 +927,7 @@ SSL_CTX *create_ssl_context(const char *private_key_file, const char *cert_file,
// NPN advertisement
#ifndef OPENSSL_NO_NEXTPROTONEG
SSL_CTX_set_next_protos_advertised_cb
(
ssl_ctx
,
next_proto_cb
,
nullptr
);
#endif
#endif
// !OPENSSL_NO_NEXTPROTONEG
#if OPENSSL_VERSION_NUMBER >= 0x10002000L
// ALPN selection callback
SSL_CTX_set_alpn_select_cb
(
ssl_ctx
,
alpn_select_proto_cb
,
nullptr
);
...
...
@@ -1124,7 +1124,7 @@ SSL_CTX *create_ssl_client_context(
// OpenSSL does not offer SSL_set_next_proto_select_cb.
#ifndef OPENSSL_NO_NEXTPROTONEG
SSL_CTX_set_next_proto_select_cb
(
ssl_ctx
,
next_proto_select_cb
,
nullptr
);
#endif
#endif
// !OPENSSL_NO_NEXTPROTONEG
return
ssl_ctx
;
}
...
...
This diff is collapsed.
Click to expand it.
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