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
212635ee
Commit
212635ee
authored
Nov 08, 2019
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Follow ngtcp2 API update
parent
2d80acfd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
8 deletions
+11
-8
src/h2load.h
src/h2load.h
+2
-1
src/h2load_quic.cc
src/h2load_quic.cc
+9
-7
No files found.
src/h2load.h
View file @
212635ee
...
@@ -467,7 +467,8 @@ struct Client {
...
@@ -467,7 +467,8 @@ struct Client {
int
quic_stream_close
(
int64_t
stream_id
,
uint64_t
app_error_code
);
int
quic_stream_close
(
int64_t
stream_id
,
uint64_t
app_error_code
);
int
quic_stream_reset
(
int64_t
stream_id
,
uint64_t
app_error_code
);
int
quic_stream_reset
(
int64_t
stream_id
,
uint64_t
app_error_code
);
int
quic_extend_max_local_streams
();
int
quic_extend_max_local_streams
();
int
quic_update_key
();
int
quic_update_key
(
uint8_t
*
rx_key
,
uint8_t
*
rx_iv
,
uint8_t
*
tx_key
,
uint8_t
*
tx_iv
);
int
quic_on_key
(
ngtcp2_crypto_level
level
,
const
uint8_t
*
rx_secret
,
int
quic_on_key
(
ngtcp2_crypto_level
level
,
const
uint8_t
*
rx_secret
,
const
uint8_t
*
tx_secret
,
size_t
secretlen
);
const
uint8_t
*
tx_secret
,
size_t
secretlen
);
...
...
src/h2load_quic.cc
View file @
212635ee
...
@@ -223,10 +223,11 @@ int get_new_connection_id(ngtcp2_conn *conn, ngtcp2_cid *cid, uint8_t *token,
...
@@ -223,10 +223,11 @@ int get_new_connection_id(ngtcp2_conn *conn, ngtcp2_cid *cid, uint8_t *token,
}
// namespace
}
// namespace
namespace
{
namespace
{
int
update_key
(
ngtcp2_conn
*
conn
,
void
*
user_data
)
{
int
update_key
(
ngtcp2_conn
*
conn
,
uint8_t
*
rx_key
,
uint8_t
*
rx_iv
,
uint8_t
*
tx_key
,
uint8_t
*
tx_iv
,
void
*
user_data
)
{
auto
c
=
static_cast
<
Client
*>
(
user_data
);
auto
c
=
static_cast
<
Client
*>
(
user_data
);
if
(
c
->
quic_update_key
()
!=
0
)
{
if
(
c
->
quic_update_key
(
rx_key
,
rx_iv
,
tx_key
,
tx_iv
)
!=
0
)
{
return
NGTCP2_ERR_CALLBACK_FAILURE
;
return
NGTCP2_ERR_CALLBACK_FAILURE
;
}
}
...
@@ -234,13 +235,14 @@ int update_key(ngtcp2_conn *conn, void *user_data) {
...
@@ -234,13 +235,14 @@ int update_key(ngtcp2_conn *conn, void *user_data) {
}
}
}
// namespace
}
// namespace
int
Client
::
quic_update_key
()
{
int
Client
::
quic_update_key
(
uint8_t
*
rx_key
,
uint8_t
*
rx_iv
,
uint8_t
*
tx_key
,
uint8_t
*
tx_iv
)
{
std
::
array
<
uint8_t
,
64
>
rx_secret
,
tx_secret
;
std
::
array
<
uint8_t
,
64
>
rx_secret
,
tx_secret
;
if
(
ngtcp2_crypto_update_
and_install_key
(
if
(
ngtcp2_crypto_update_
key
(
quic
.
conn
,
rx_secret
.
data
(),
tx_secret
.
data
(),
quic
.
conn
,
rx_secret
.
data
(),
tx_secret
.
data
(),
nullptr
,
nullptr
,
rx_key
,
rx_iv
,
tx_key
,
tx_iv
,
nullptr
,
nullptr
,
quic
.
rx_secret
.
data
(),
quic
.
tx_secret
.
data
(),
quic
.
rx_secret
.
data
(),
quic
.
tx_secret
.
data
(),
quic
.
rx_secret
.
size
())
!=
0
)
{
quic
.
rx_secret
.
size
())
!=
0
)
{
return
-
1
;
return
-
1
;
}
}
...
...
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