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

Support ZSTD for compressed certificates #313

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

vanc
Copy link

@vanc vanc commented Jun 1, 2020

This is to add ZSTD support for the compressed certificate RFC 1.

This is to add ZSTD support for the compressed certificate RFC [1].

[1]: https://tools.ietf.org/html/draft-ietf-tls-certificate-compression-10
@vanc
Copy link
Author

vanc commented Jun 1, 2020

Tested with facebook.com with the cli command and it works fine. Facebook servers prefer ZSTD when both Brotli and ZSTD are advertised in ClientHello.

Copy link
Member

@kazuho kazuho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the pull request. It's good to have support for ZSTD added.

Would you mind adding the following?

  • code that uses ZSTD for compressing the certificates
  • command line option to the cli command for using ZSTD
  • test that uses ZSTD to t/e2e.t alongside the one that we have for brotli

As much as I am happy to see support for ZSTD being added, I am afraid we cannot maintain them without tests.

ADD_DEFINITIONS(-DPTLS_HAVE_ZSTD)
LIST(APPEND CORE_EXTRA_LIBS ${LibZSTD})
TARGET_LINK_LIBRARIES(cli ${LibZSTD})
ENDIF ()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please move the detection logic next to the one that we have for brotli, and align the approach?

Then, we could do something like IF ((BROTLI_DEC_FOUND AND BROTLI_ENC_FOUND) OR ZSTD_FOUND) to link against lib/certificate_compression.c if either of the compression library was found.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the review. I'll be working on the suggestions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants