Skip to content
This repository was archived by the owner on Aug 11, 2020. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion deps/ngtcp2/crypto/includes/ngtcp2/ngtcp2_crypto.h
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ ngtcp2_crypto_update_key(ngtcp2_conn *conn, uint8_t *rx_secret,
const uint8_t *current_tx_secret, size_t secretlen);

/**
* @funtion
* @function
*
* `ngtcp2_crypto_update_key_cb` is a wrapper function around
* `ngtcp2_crypto_update_key`. It can be directly passed to
Expand Down
2 changes: 2 additions & 0 deletions deps/ngtcp2/crypto/openssl/openssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -381,11 +381,13 @@ int ngtcp2_crypto_set_remote_transport_params(ngtcp2_conn *conn, void *tls,

rv = ngtcp2_decode_transport_params(&params, exttype, tp, tplen);
if (rv != 0) {
ngtcp2_conn_set_tls_error(conn, rv);
return -1;
}

rv = ngtcp2_conn_set_remote_transport_params(conn, &params);
if (rv != 0) {
ngtcp2_conn_set_tls_error(conn, rv);
return -1;
}

Expand Down
8 changes: 4 additions & 4 deletions deps/ngtcp2/crypto/shared.c
Original file line number Diff line number Diff line change
Expand Up @@ -229,14 +229,14 @@ int ngtcp2_crypto_derive_and_install_key(
}
break;
case NGTCP2_CRYPTO_LEVEL_APP:
rv = ngtcp2_conn_install_key(conn, rx_secret, tx_secret, rx_key, rx_iv,
rx_hp_key, tx_key, tx_iv, tx_hp_key, secretlen,
keylen, ivlen);
rv = ngtcp2_crypto_set_remote_transport_params(conn, tls, side);
if (rv != 0) {
return -1;
}

rv = ngtcp2_crypto_set_remote_transport_params(conn, tls, side);
rv = ngtcp2_conn_install_key(conn, rx_secret, tx_secret, rx_key, rx_iv,
rx_hp_key, tx_key, tx_iv, tx_hp_key, secretlen,
keylen, ivlen);
if (rv != 0) {
return -1;
}
Expand Down
21 changes: 21 additions & 0 deletions deps/ngtcp2/lib/includes/ngtcp2/ngtcp2.h
Original file line number Diff line number Diff line change
Expand Up @@ -1932,6 +1932,27 @@ NGTCP2_EXTERN int ngtcp2_conn_install_key(
NGTCP2_EXTERN int ngtcp2_conn_initiate_key_update(ngtcp2_conn *conn,
ngtcp2_tstamp ts);

/**
* @function
*
* `ngtcp2_conn_set_tls_error` sets the TLS related error in |conn|.
* In general, error code should be propagated via return value, but
* sometimes ngtcp2 API is called inside callback function of TLS
* stack and it does not allow to return ngtcp2 error code directly.
* In this case, implementation can set the error code (e.g.,
* NGTCP2_ERR_MALFORMED_TRANSPORT_PARAM) using this function.
*/
NGTCP2_EXTERN void ngtcp2_conn_set_tls_error(ngtcp2_conn *conn, int liberr);

/**
* @function
*
* `ngtcp2_conn_get_tls_error` returns the value set by
* `ngtcp2_conn_set_tls_error`. If no value is set, this function
* returns 0.
*/
NGTCP2_EXTERN int ngtcp2_conn_get_tls_error(ngtcp2_conn *conn);

/**
* @function
*
Expand Down
90 changes: 45 additions & 45 deletions deps/ngtcp2/lib/includes/ngtcp2/version.h
Original file line number Diff line number Diff line change
@@ -1,45 +1,45 @@
/*
* ngtcp2
*
* Copyright (c) 2016 ngtcp2 contributors
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#ifndef VERSION_H
#define VERSION_H

/**
* @macro
*
* Version number of the ngtcp2 library release.
*/
#define NGTCP2_VERSION "0.1.90"

/**
* @macro
*
* Numerical representation of the version number of the ngtcp2
* library release. This is a 24 bit number with 8 bits for major
* number, 8 bits for minor and 8 bits for patch. Version 1.2.3
* becomes 0x010203.
*/
#define NGTCP2_VERSION_NUM 0x00015a

#endif /* VERSION_H */
/*
* ngtcp2
*
* Copyright (c) 2016 ngtcp2 contributors
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#ifndef VERSION_H
#define VERSION_H
/**
* @macro
*
* Version number of the ngtcp2 library release.
*/
#define NGTCP2_VERSION "0.1.90"
/**
* @macro
*
* Numerical representation of the version number of the ngtcp2
* library release. This is a 24 bit number with 8 bits for major
* number, 8 bits for minor and 8 bits for patch. Version 1.2.3
* becomes 0x010203.
*/
#define NGTCP2_VERSION_NUM 0x00015a
#endif /* VERSION_H */
Loading