gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnurl] 99/264: ngtcp2: update to git master for the key installation AP


From: gnunet
Subject: [gnurl] 99/264: ngtcp2: update to git master for the key installation API change
Date: Thu, 30 Apr 2020 16:06:42 +0200

This is an automated email from the git hooks/post-receive script.

nikita pushed a commit to branch master
in repository gnurl.

commit 8efd26afbfad72d86c665ec79418db3ac4927638
Author: Daiki Ueno <address@hidden>
AuthorDate: Sun Mar 29 14:53:39 2020 +0200

    ngtcp2: update to git master for the key installation API change
    
    This updates the ngtcp2 OpenSSL backend to follow the API change in
    commit 32e703164 of ngtcp2.
    
    Notable changes are:
    - ngtcp2_crypto_derive_and_install_{rx,tx}_key have been added to replace
      ngtcp2_crypto_derive_and_install_key
    - the 'side' argument of ngtcp2_crypto_derive_and_install_initial_key
      has been removed
    
    Fixes #5166
    Closes #5168
---
 lib/vquic/ngtcp2.c | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/lib/vquic/ngtcp2.c b/lib/vquic/ngtcp2.c
index 2f6ee8bdf..22aa53b29 100644
--- a/lib/vquic/ngtcp2.c
+++ b/lib/vquic/ngtcp2.c
@@ -123,8 +123,8 @@ static int setup_initial_crypto_context(struct quicsocket 
*qs)
   const ngtcp2_cid *dcid = ngtcp2_conn_get_dcid(qs->qconn);
 
   if(ngtcp2_crypto_derive_and_install_initial_key(
-         qs->qconn, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, dcid,
-         NGTCP2_CRYPTO_SIDE_CLIENT) != 0)
+         qs->qconn, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+         dcid) != 0)
     return -1;
 
   return 0;
@@ -169,9 +169,13 @@ static int quic_set_encryption_secrets(SSL *ssl,
   struct quicsocket *qs = (struct quicsocket *)SSL_get_app_data(ssl);
   int level = quic_from_ossl_level(ossl_level);
 
-  if(ngtcp2_crypto_derive_and_install_key(
-         qs->qconn, ssl, NULL, NULL, NULL, NULL, NULL, NULL, level, rx_secret,
-         tx_secret, secretlen, NGTCP2_CRYPTO_SIDE_CLIENT) != 0)
+  if(level != NGTCP2_CRYPTO_LEVEL_EARLY &&
+     ngtcp2_crypto_derive_and_install_rx_key(
+         qs->qconn, ssl, NULL, NULL, NULL, level, rx_secret, secretlen) != 0)
+    return 0;
+
+  if(ngtcp2_crypto_derive_and_install_tx_key(
+         qs->qconn, ssl, NULL, NULL, NULL, level, tx_secret, secretlen) != 0)
     return 0;
 
   if(level == NGTCP2_CRYPTO_LEVEL_APP) {

-- 
To stop receiving notification emails like this one, please contact
address@hidden.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]