Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ngtcp2: Support the latest update key callback type #4735

Merged
merged 1 commit into from Dec 20, 2019

Conversation

jay
Copy link
Member

@jay jay commented Dec 18, 2019

  • Remove our cb_update_key in favor of ngtcp2's new
    ngtcp2_crypto_update_key_cb which does the same thing.

Several days ago the ngtcp2_update_key callback function prototype was
changed in ngtcp2/ngtcp2@42ce09c. Though it would be possible to
fix up our cb_update_key for that change they also added
ngtcp2_crypto_update_key_cb which does the same thing so we'll use that
instead.

Ref: ngtcp2/ngtcp2@42ce09c

Closes #xxxx


Disclaimer: I'm not yet using HTTP/3. This is an attempt to fix this CI error:

  CC       vquic/libcurl_la-ngtcp2.lo
vquic/ngtcp2.c:559:3: error: initialization of ‘int (*)(ngtcp2_conn *, uint8_t *, uint8_t *, uint8_t *, uint8_t *, uint8_t *, uint8_t *, const uint8_t *, const uint8_t *, size_t,  void *)’ {aka ‘int (*)(struct ngtcp2_conn *, unsigned char *, unsigned char *, unsigned char *, unsigned char *, unsigned char *, unsigned char *, const unsigned char *, const unsigned char *, long unsigned int,  void *)’} from incompatible pointer type ‘int (*)(ngtcp2_conn *, uint8_t *, uint8_t *, uint8_t *, uint8_t *, void *)’ {aka ‘int (*)(struct ngtcp2_conn *, unsigned char *, unsigned char *, unsigned char *, unsigned char *, void *)’} [-Werror=incompatible-pointer-types]
   cb_update_key, /* update_key */
   ^~~~~~~~~~~~~
vquic/ngtcp2.c:559:3: note: (near initialization for ‘ng_callbacks.update_key’)

@jay jay added the HTTP/3 h3 or quic related label Dec 18, 2019
@jay jay requested a review from tatsuhiro-t December 18, 2019 19:01
@bagder
Copy link
Member

bagder commented Dec 19, 2019

👍 - this fixes the build and I tried curl --http3 successfully against https://nghttp2.org:4433/ several times.

@tatsuhiro-t
Copy link
Contributor

Now that secrets are stored into ngtcp2_conn object, curl no longer needs to store them. qs->rx_secret and qs->tx_secret can be removed.

- Remove our cb_update_key in favor of ngtcp2's new
  ngtcp2_crypto_update_key_cb which does the same thing.

Several days ago the ngtcp2_update_key callback function prototype was
changed in ngtcp2/ngtcp2@42ce09c. Though it would be possible to
fix up our cb_update_key for that change they also added
ngtcp2_crypto_update_key_cb which does the same thing so we'll use that
instead.

Ref: ngtcp2/ngtcp2@42ce09c

Closes curl#4735
@jay
Copy link
Member Author

jay commented Dec 20, 2019

Now that secrets are stored into ngtcp2_conn object, curl no longer needs to store them. qs->rx_secret and qs->tx_secret can be removed.

Ok thanks, I have just amended the proposed changes to remove tx/rx secret from quicsocket entirely.

@jay jay closed this in 10121a4 Dec 20, 2019
@jay jay merged commit 10121a4 into curl:master Dec 20, 2019
@jay jay deleted the fix_ngtcp2_update_key branch December 20, 2019 07:47
@lock lock bot locked as resolved and limited conversation to collaborators Mar 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
HTTP/3 h3 or quic related
Development

Successfully merging this pull request may close these issues.

None yet

3 participants