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
b48bcb21
Commit
b48bcb21
authored
Apr 03, 2018
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
examples: Use C style comment in .c files
parent
6f3ce2c7
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
examples/libevent-client.c
examples/libevent-client.c
+2
-2
examples/libevent-server.c
examples/libevent-server.c
+3
-3
No files found.
examples/libevent-client.c
View file @
b48bcb21
...
...
@@ -343,7 +343,7 @@ static SSL_CTX *create_ssl_ctx(void) {
#if OPENSSL_VERSION_NUMBER >= 0x10002000L
SSL_CTX_set_alpn_protos
(
ssl_ctx
,
(
const
unsigned
char
*
)
"
\x02
h2"
,
3
);
#endif /
/ OPENSSL_VERSION_NUMBER >= 0x10002000L
#endif
/
* OPENSSL_VERSION_NUMBER >= 0x10002000L */
return
ssl_ctx
;
}
...
...
@@ -515,7 +515,7 @@ static void eventcb(struct bufferevent *bev, short events, void *ptr) {
if
(
alpn
==
NULL
)
{
SSL_get0_alpn_selected
(
ssl
,
&
alpn
,
&
alpnlen
);
}
#endif /
/ OPENSSL_VERSION_NUMBER >= 0x10002000L
#endif
/
* OPENSSL_VERSION_NUMBER >= 0x10002000L */
if
(
alpn
==
NULL
||
alpnlen
!=
2
||
memcmp
(
"h2"
,
alpn
,
2
)
!=
0
)
{
fprintf
(
stderr
,
"h2 is not negotiated
\n
"
);
...
...
examples/libevent-server.c
View file @
b48bcb21
...
...
@@ -137,7 +137,7 @@ static int alpn_select_proto_cb(SSL *ssl, const unsigned char **out,
return
SSL_TLSEXT_ERR_OK
;
}
#endif /
/ OPENSSL_VERSION_NUMBER >= 0x10002000L
#endif
/
* OPENSSL_VERSION_NUMBER >= 0x10002000L */
/* Create SSL_CTX. */
static
SSL_CTX
*
create_ssl_ctx
(
const
char
*
key_file
,
const
char
*
cert_file
)
{
...
...
@@ -180,7 +180,7 @@ static SSL_CTX *create_ssl_ctx(const char *key_file, const char *cert_file) {
#if OPENSSL_VERSION_NUMBER >= 0x10002000L
SSL_CTX_set_alpn_select_cb
(
ssl_ctx
,
alpn_select_proto_cb
,
NULL
);
#endif /
/ OPENSSL_VERSION_NUMBER >= 0x10002000L
#endif
/
* OPENSSL_VERSION_NUMBER >= 0x10002000L */
return
ssl_ctx
;
}
...
...
@@ -701,7 +701,7 @@ static void eventcb(struct bufferevent *bev, short events, void *ptr) {
if
(
alpn
==
NULL
)
{
SSL_get0_alpn_selected
(
ssl
,
&
alpn
,
&
alpnlen
);
}
#endif /
/ OPENSSL_VERSION_NUMBER >= 0x10002000L
#endif
/
* OPENSSL_VERSION_NUMBER >= 0x10002000L */
if
(
alpn
==
NULL
||
alpnlen
!=
2
||
memcmp
(
"h2"
,
alpn
,
2
)
!=
0
)
{
fprintf
(
stderr
,
"%s h2 is not negotiated
\n
"
,
session_data
->
client_addr
);
...
...
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