Use system zlib?
bgemmill opened this issue · 9 comments
For those of us with a system zlib installed, is there a way to tell beast to use it rather than the internal header implementation?
In my particular case, I'm using boost::iostreams and all ready have the adapters built for a number of compression libraries.
Version of Beast
beast from boost 1.86
Steps necessary to reproduce the problem
- Connect to a websocket seerver somewhere and request compression.
- Receive data
- Observe that this code is used
All relevant compiler information
$ clang --version
Ubuntu clang version 18.1.8
If you want to use it for inflating/deflating HTTP messages, you are free to use any method you prefer, as there is no dependency on them in the implementation. However, websocket::stream
is tightly coupled with zlib::deflate_stream
and zlib::inflate_stream
, so you cannot substitute your own implementation.
Thanks for the heads up, the websocket stream is the one I'm interested in.
You're saying it's so tightly coupled that it's not reasonable to use a system implementation?
You're saying it's so tightly coupled that it's not reasonable to use a system implementation?
I mean, the interface doesn't allow you to substitute your own implementation.
Could that be changed? That's largely why I filed this report :-)
Could that be changed? That's largely why I filed this report :-)
Do you have a motivating use case for it?
It can't be changed.
Beast tracks all fixes made to zlib, and the handling of this CVE is exactly why Beast does not use a system zlib. Note that the CVE regards one of the examples in the zlib repository, which Beast does not use (and does not contain). In other words Beast is unaffected.
If beast tracks fixes to zlib that's mostly what I was looking for. Thanks for the heads up.