Certificate Compression (RFC8879)#18186
Conversation
|
This PR is in a state where it requires action by @openssl/otc but the last update was 30 days ago |
351cfbb to
3d2f81d
Compare
|
Not sure why |
mattcaswell
left a comment
There was a problem hiding this comment.
Nice work!
I reviewed this commit by commit, so some of my comments may have been made irrelevant by later changes
There was a problem hiding this comment.
Should we run some tests with this code and asan?
There was a problem hiding this comment.
I'll look into that.
|
Thank you @mattcaswell! I will be updating this shortly. |
42bc295 to
32fc27b
Compare
There was a problem hiding this comment.
I don't see zstd options description
There was a problem hiding this comment.
I had meant to remove brotli since it was not longer considered "special" (like zlib). It's now just a regular option to be used with enable- or no-.
There was a problem hiding this comment.
This allocation can failed.
There was a problem hiding this comment.
Yes, and it's checked in tls13_process_compressed_certificate(); which is called by both the client and server code. So, I put the check in there, rather than having two checks before the call of the function.
|
Ping @mattcaswell ? |
Sorry - been away on vacation for the last 2 weeks. Will try and pick this up when I am caught up. |
021c166 to
b81cc52
Compare
|
I removed |
144a3a1 to
bf94cb8
Compare
Done. |
bf94cb8 to
12e8c1e
Compare
|
ping @mattcaswell ? |
I just did it locally, but I'm also a committer. |
|
24 hours has passed since 'approval: done' was set, but as this PR has been updated in that time the label 'approval: ready to merge' is not being automatically set. Please review the updates and set the label manually. |
|
Just comments... starting merge. |
|
Merged to master. Thanks @mattcaswell @hlandau. |
Reviewed-by: Matt Caswell <[email protected]> Reviewed-by: Hugo Landau <[email protected]> (Merged from #18186)
Reviewed-by: Matt Caswell <[email protected]> Reviewed-by: Hugo Landau <[email protected]> (Merged from #18186)
Use the normal OPENSSL_NO_ prefix to enable/disable ZLIB Make `BIO_f_zlib()` always available. Reviewed-by: Matt Caswell <[email protected]> Reviewed-by: Hugo Landau <[email protected]> (Merged from #18186)
* Compressed Certificate extension (server/client) * Server certificates (send/receive) * Client certificate (send/receive) Reviewed-by: Matt Caswell <[email protected]> Reviewed-by: Hugo Landau <[email protected]> (Merged from #18186)
Reviewed-by: Matt Caswell <[email protected]> Reviewed-by: Hugo Landau <[email protected]> (Merged from #18186)
size_t-ify the COMP_METHOD structure and functions. Get rid of the non-functional COMP_METHODS and return NULL instead. Reviewed-by: Matt Caswell <[email protected]> Reviewed-by: Hugo Landau <[email protected]> (Merged from #18186)
Reviewed-by: Matt Caswell <[email protected]> Reviewed-by: Hugo Landau <[email protected]> (Merged from #18186)
|
Coverity has picked up a few things/.. New defect(s) Reported-by: Coverity Scan ** CID 1516095: (DEADCODE) *** CID 1516095: (DEADCODE)
163 server_pref[0] = expected_server;
206 SSL_CONNECTION sc = SSL_CONNECTION_FROM_SSL(serverssl); ** CID 1516094: Memory - illegal accesses (UNINIT) *** CID 1516094: Memory - illegal accesses (UNINIT)
3735 WPACKET_cleanup(&tmppkt); ** CID 1516093: (TAINTED_SCALAR) *** CID 1516093: (TAINTED_SCALAR)
1337 BIO_printf(bio, "Compressed length=%d, Ratio=%f:1\n", (int)clen, (float)uclen / (float)clen);
1345 if ((ucdata = OPENSSL_malloc(uclen)) == NULL) |
|
Thanks @slontis, I'll take a look at these. |
These will look like dead code if less than two compression algorithms are configured. If there are two compression algorithms configured, then this won't be dead code. This is due to a check on line 152 which skips the tests when trying this configuration, the expected values are initialized and set based on the configuration compression algorithms. |
|
See #19440 |
Reviewed-by: Matt Caswell <[email protected]> Reviewed-by: Hugo Landau <[email protected]> (Merged from openssl#18186)
Reviewed-by: Matt Caswell <[email protected]> Reviewed-by: Hugo Landau <[email protected]> (Merged from openssl#18186)
Use the normal OPENSSL_NO_ prefix to enable/disable ZLIB Make `BIO_f_zlib()` always available. Reviewed-by: Matt Caswell <[email protected]> Reviewed-by: Hugo Landau <[email protected]> (Merged from openssl#18186)
* Compressed Certificate extension (server/client) * Server certificates (send/receive) * Client certificate (send/receive) Reviewed-by: Matt Caswell <[email protected]> Reviewed-by: Hugo Landau <[email protected]> (Merged from openssl#18186)
Reviewed-by: Matt Caswell <[email protected]> Reviewed-by: Hugo Landau <[email protected]> (Merged from openssl#18186)
size_t-ify the COMP_METHOD structure and functions. Get rid of the non-functional COMP_METHODS and return NULL instead. Reviewed-by: Matt Caswell <[email protected]> Reviewed-by: Hugo Landau <[email protected]> (Merged from openssl#18186)
Reviewed-by: Matt Caswell <[email protected]> Reviewed-by: Hugo Landau <[email protected]> (Merged from openssl#18186)
Replacement of #9155 (github doesn't allow change of source repositories)
Add support for brotli compression
Add support for Zstandardi compression
Add support for RFC8879
Add support for callback API, which allows the user to handle either compression expansion or pre-compressed server certificates.
Checklist