Skip to content

Certificate Compression (RFC8879)#9155

Closed
tmshort wants to merge 5 commits into
openssl:masterfrom
akamai:master-certcomp
Closed

Certificate Compression (RFC8879)#9155
tmshort wants to merge 5 commits into
openssl:masterfrom
akamai:master-certcomp

Conversation

@tmshort

@tmshort tmshort commented Jun 13, 2019

Copy link
Copy Markdown
Contributor

Add support for brotli compression
Add support for draft-ietf-tls-certificate-compression[-05] RFC8879
Add support for callback API, which allows the user to handle either compression expansion or pre-compressed server certificates.

Checklist
  • documentation is added or updated
  • tests are added or updated

@tmshort

tmshort commented Jun 13, 2019

Copy link
Copy Markdown
Contributor Author

Certificate compression is enabled by default; so, it had to be removed from a number of the unit tests because it changes the number of extensions and the messages. One of the info callback tests checks to see that the compressed certificate message is indeed used.

@tmshort

tmshort commented Jun 13, 2019

Copy link
Copy Markdown
Contributor Author

I could not find tests for zlib upon which to base brotli compression.

@tmshort

tmshort commented Jun 13, 2019

Copy link
Copy Markdown
Contributor Author

brotli is the compression method supported by Chromium.

@tmshort

tmshort commented Jun 13, 2019

Copy link
Copy Markdown
Contributor Author

The AppVeyor builds were failing because of make doc-nits, doesn't help that there's no compression documentation at all!

@tmshort

tmshort commented Jun 18, 2019

Copy link
Copy Markdown
Contributor Author

This works with the stable release of Chrome (75).
Wireshark 3.0.0 recognizes the compress_certificate option.

Comment thread crypto/comp/c_brotli.c Outdated
Comment thread crypto/comp/c_brotli.c Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

why not just typedef this?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The equivalent isn't typedef'd in c_zlib.c; it's also not a public structure that is expected to be used everywhere.

Comment thread crypto/comp/c_brotli.c Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

why do you check the state for NULL here but not in other methods above?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Appears that brotli_stateful_finish() is the outlier here; all other functions check for state not being NULL. This was based on the original c_zlib.c code, which also did not check its state variable in the finish function.

Comment thread include/openssl/crypto.h Outdated
Comment thread ssl/packet.c Outdated
@tmshort

tmshort commented Jun 26, 2019

Copy link
Copy Markdown
Contributor Author

@kaduk what's the status on this draft, as in, do you think it will go another round, or will it be published as-is (technically) as an RFC?

Comment thread ssl/statem/statem_lib.c Outdated
@kaduk

kaduk commented Jan 9, 2020

Copy link
Copy Markdown
Contributor

Per https://www.rfc-editor.org/current_queue.php#draft-ietf-tls-certificate-compression the corresponding document is in the RFC Production Center's publication queue, but is currently waiting for draft-kucherawy-rfc8478bis to be published (currently in IETF Last Call).

@tmshort

tmshort commented Jan 21, 2020

Copy link
Copy Markdown
Contributor Author

re: draft-kucherawy-rfc8478bis I didn't put in zstd support.
Most of the recent changes to the ID for certificate compression are just reference updates; nothing to the protocol

@tmshort

tmshort commented Dec 15, 2020

Copy link
Copy Markdown
Contributor Author

Fully updated for RFC8879

@tmshort tmshort changed the title Certificate Compression Certificate Compression (RFC8879) Dec 15, 2020
@tmshort

tmshort commented Dec 15, 2020

Copy link
Copy Markdown
Contributor Author

The "GitHub CI / sanitizers" seems to be failing on test 30-test_evp_pkey_provided which appears to be unrelated to this PR.

@t8m

t8m commented Dec 15, 2020

Copy link
Copy Markdown
Member

I've rerun the jobs as we do not usually see a failure in 30-test_evp_pkey_provided. Just the encoder-decoder regularly fails.

@tmshort

tmshort commented Dec 15, 2020

Copy link
Copy Markdown
Contributor Author

With config --debug enable-asan enable-ubsan enable-rc5 enable-md2 enable-ec_nistp_64_gcc_128 (the same as the sanitize CI)
My local builds have shown:

SUMMARY: AddressSanitizer: 2020 byte(s) leaked in 35 allocation(s).
../../util/wrap.pl ../../test/evp_pkey_provided_test ../../test/recipes/30-test_evp_pkey_provided => 1
not ok 1 - running evp_pkey_provided_test
30-test_evp_pkey_provided.t ........ 1/? ---------------------------------------
#   Failed test 'running evp_pkey_provided_test'
#   at test/recipes/30-test_evp_pkey_provided.t line 17.
30-test_evp_pkey_provided.t ........ Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/1 subtests
30-test_pbelu.t .................... ok

@tmshort

tmshort commented Dec 15, 2020

Copy link
Copy Markdown
Contributor Author

I see the above on the master branch as well, commit 0cc0164

@mattcaswell

Copy link
Copy Markdown
Member

@mattcaswell @paulidale @t8m How does one get this out of the hold: substantial feature state?

The point of having this hold is to identify significant features that are stuck because they are big and complex. The idea is that the OTC will first review them to confirm whether or not they are a good idea from a technical perspective before being passed to OMC for an assessment of priority (i.e. if and when they should go in). It's on the draft agenda for the next OTC meeting on Tuesday.

@slontis

slontis commented Dec 14, 2021

Copy link
Copy Markdown
Member

This will be required for QUIC

@tmshort

tmshort commented Dec 14, 2021

Copy link
Copy Markdown
Contributor Author

check_docs appears to be complaining about an area of CHANGES.md untouched by this PR.

@t8m

t8m commented Dec 14, 2021

Copy link
Copy Markdown
Member

check_docs appears to be complaining about an area of CHANGES.md untouched by this PR.

Fix for that in #17274

@tmshort

tmshort commented Dec 14, 2021

Copy link
Copy Markdown
Contributor Author

check_docs appears to be complaining about an area of CHANGES.md untouched by this PR.

Fix for that in #17274

Thanks, I wasn't worried about it... but thought I'd note "it wasn't me!" :)

@tmshort

tmshort commented Jan 4, 2022

Copy link
Copy Markdown
Contributor Author

The point of having this hold is to identify significant features that are stuck because they are big and complex. The idea is that the OTC will first review them to confirm whether or not they are a good idea from a technical perspective before being passed to OMC for an assessment of priority (i.e. if and when they should go in). It's on the draft agenda for the next OTC meeting on Tuesday.

Any updates from OTC @mattcaswell ?

@tmshort
tmshort force-pushed the master-certcomp branch 2 times, most recently from 5591616 to de55ff0 Compare January 10, 2022 18:47
@paulidale

Copy link
Copy Markdown
Contributor

The OTC didn't get to this (and others). It's on the agenda for the next call (later today for me).

@mattcaswell

Copy link
Copy Markdown
Member

The OTC didn't get to this (and others). It's on the agenda for the next call (later today for me).

Actually its already been passed to OMC

Comment thread doc/man3/SSL_CONF_cmd.pod Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nit : This feature or flag was introduced... ?

Comment thread doc/man3/SSL_CONF_cmd.pod Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If i remember well, TLS Compression is disabled by default, for security reasons.
So this is a documentation fix that should be backported ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yup. Since I was in here dealing with (other) compression, I fixed it. But this would be appropriate for backporting.

@mattcaswell

Copy link
Copy Markdown
Member

The OMC have voted to remove the current holds ("need OMC decision" and "substantial feature") from this PR. It may now proceed normally as per the standard review process.

@paulidale

Copy link
Copy Markdown
Contributor

Ping @openssl/committers for reviews. I do not feel qualified to do anything better than a too superficial review of this.

tmshort added 5 commits April 14, 2022 11:18
* Compressed Certificate extension (server/client)
* Server certificates (send/receive)
* Client certificate (send/receive)
Add API to call user code to compress certificate
Can be used for pre-compressed server certificates
@tmshort

tmshort commented Apr 26, 2022

Copy link
Copy Markdown
Contributor Author

Closing in favor of #18186

@tmshort tmshort closed this Apr 26, 2022
@mattcaswell mattcaswell mentioned this pull request Jun 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

branch: master Applies to master branch triaged: feature The issue/pr requests/adds a feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.