Opened 6 years ago
Last modified 5 years ago
#12710 new Bugs
Asio with OpenSSL 1.1.0 compiles but does not work
Reported by: | Owned by: | chris_kohlhoff | |
---|---|---|---|
Milestone: | To Be Determined | Component: | asio |
Version: | Boost 1.62.0 | Severity: | Regression |
Keywords: | OpenSSL 1.1.0 | Cc: |
Description
Setup:
Debian Boost 1.62.0 OpenSSL 1.1.0c-2
Problem: Previously written program that works perfectly well with the same Boost version and the older version of OpenSSL compiles just fine but does not work.
The program yields "stream truncated" error.
Desired outcome: Boost Asio works equally well with the newer OpenSSL.
Attachments (1)
Change History (6)
comment:1 by , 6 years ago
comment:2 by , 5 years ago
Can reproduce with OpenSSL 1.1.0f and boost 1.64.0. Just ignoring this error seems to make program work correctly.
comment:3 by , 5 years ago
Can reproduce with LibreSSL 2.6.0. Like the previous comment ignoring the error seems to make the program work correctly.
comment:4 by , 5 years ago
I must add, however, that I am not sure that my patch is correct. It fixes the problem, sure, but whether it is correct to ignore SSL shutdown status in OpenSSL 1.1.0 -- I do not know.
However, OpenSSL team notes that one of the major changes between OpenSSL 1.0.2h and OpenSSL 1.1.0 was rewritten SSL/TLS state machine, version negotiation and record layer. (See https://www.openssl.org/news/openssl-1.1.0-notes.html)
comment:5 by , 5 years ago
I also get "stream truncated" error in async_close's completion handler. I use openssl-1.1.0f on windows x64 /MT
Additional note:
Example program at http://www.boost.org/doc/libs/1_53_0/doc/html/boost_asio/example/ssl/client.cpp
is sufficient to demonstrate the problem (just comment out the certificate verification knobs).