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
132cd21c
Commit
132cd21c
authored
Dec 07, 2020
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Compile with the latest ngtcp2 and nghttp3
parent
863434fa
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
24 deletions
+10
-24
src/h2load_http3_session.cc
src/h2load_http3_session.cc
+3
-3
src/h2load_quic.cc
src/h2load_quic.cc
+7
-21
No files found.
src/h2load_http3_session.cc
View file @
132cd21c
...
...
@@ -289,7 +289,7 @@ int Http3Session::init_conn() {
return
-
1
;
}
nghttp3_c
onn_c
allbacks
callbacks
{
nghttp3_callbacks
callbacks
{
nullptr
,
// acked_stream_data
h2load
::
stream_close
,
h2load
::
recv_data
,
...
...
@@ -310,8 +310,8 @@ int Http3Session::init_conn() {
auto
config
=
client_
->
worker
->
config
;
nghttp3_
conn_
settings
settings
;
nghttp3_
conn_
settings_default
(
&
settings
);
nghttp3_settings
settings
;
nghttp3_settings_default
(
&
settings
);
settings
.
qpack_max_table_capacity
=
config
->
header_table_size
;
settings
.
qpack_blocked_streams
=
100
;
...
...
src/h2load_quic.cc
View file @
132cd21c
...
...
@@ -26,6 +26,8 @@
#include <iostream>
#include <ngtcp2/ngtcp2_crypto_openssl.h>
#include <openssl/err.h>
#include "h2load_http3_session.h"
...
...
@@ -233,31 +235,14 @@ ngtcp2_tstamp timestamp(struct ev_loop *loop) {
}
}
// namespace
namespace
{
ngtcp2_crypto_level
from_ossl_level
(
OSSL_ENCRYPTION_LEVEL
ossl_level
)
{
switch
(
ossl_level
)
{
case
ssl_encryption_initial
:
return
NGTCP2_CRYPTO_LEVEL_INITIAL
;
case
ssl_encryption_early_data
:
return
NGTCP2_CRYPTO_LEVEL_EARLY
;
case
ssl_encryption_handshake
:
return
NGTCP2_CRYPTO_LEVEL_HANDSHAKE
;
case
ssl_encryption_application
:
return
NGTCP2_CRYPTO_LEVEL_APPLICATION
;
default:
assert
(
0
);
}
}
}
// namespace
namespace
{
int
set_encryption_secrets
(
SSL
*
ssl
,
OSSL_ENCRYPTION_LEVEL
ossl_level
,
const
uint8_t
*
rx_secret
,
const
uint8_t
*
tx_secret
,
size_t
secret_len
)
{
auto
c
=
static_cast
<
Client
*>
(
SSL_get_app_data
(
ssl
));
if
(
c
->
quic_on_key
(
from_ossl_level
(
ossl_level
),
rx_secret
,
tx_secret
,
secret_len
)
!=
0
)
{
if
(
c
->
quic_on_key
(
ngtcp2_crypto_from_ossl_encryption_level
(
ossl_level
)
,
rx_secret
,
tx_secret
,
secret_len
)
!=
0
)
{
return
0
;
}
...
...
@@ -269,7 +254,8 @@ namespace {
int
add_handshake_data
(
SSL
*
ssl
,
OSSL_ENCRYPTION_LEVEL
ossl_level
,
const
uint8_t
*
data
,
size_t
len
)
{
auto
c
=
static_cast
<
Client
*>
(
SSL_get_app_data
(
ssl
));
c
->
quic_write_client_handshake
(
from_ossl_level
(
ossl_level
),
data
,
len
);
c
->
quic_write_client_handshake
(
ngtcp2_crypto_from_ossl_encryption_level
(
ossl_level
),
data
,
len
);
return
1
;
}
}
// namespace
...
...
@@ -318,7 +304,7 @@ int Client::quic_init(const sockaddr *local_addr, socklen_t local_addrlen,
return
-
1
;
}
auto
callbacks
=
ngtcp2_c
onn_c
allbacks
{
auto
callbacks
=
ngtcp2_callbacks
{
ngtcp2_crypto_client_initial_cb
,
nullptr
,
// recv_client_initial
h2load
::
recv_crypto_data
,
...
...
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