openssl
openssl copied to clipboard
Add zlib oneshot compression
Fixes #19520
The existing stream-based ZLIB compression does not close out the stream properly. This is incompatible with RFC1950. Add a one-shot ZLIB compression method (as used with Brotli and Zstd) to do certificate compression.
This was found by tlsfuzzer.
Checklist
- [ ] documentation is added or updated
- [ ] tests are added or updated
24 hours has passed since 'approval: done' was set, but this PR has failing CI tests. Once the tests pass it will get moved to 'approval: ready to merge' automatically, alternatively please review and set the label manually.
One of the tests is still pending after 24+ ?
As far as I can tell, looking at buildbot, there have never been any completed buildbot/master:unix-macos11-m1 builds? @levitte ?
Merged to master branch. Thank you for your contribution.
Hopefully the added bound checks won't trigger Coverity. If so we can fix that later though.
Appears to have. The failure can only occur if sizeof(size_t) > sizeof(unsigned long), which corresponds to an LLP64 system (Windows 64-bit systems with VC++ or MinGW). I can either create a Coverity exception, or do a #if with sizeof().
@t8m any preference?
I've dismissed the Coverity entries. IMO not worth fixing at all but if you want to submit a PR that silences Coverity in one way or another I'd approve it.