elonafoobar / elonafoobar

One of the Elona variants
https://elonafoobar.com
MIT License
155 stars 36 forks source link

SSL_R_SHORT_READ doesn't exist in OpenSSL 1.1 #1381

Closed Vorlent closed 5 years ago

Vorlent commented 5 years ago

環境 Environment

詳細 Details

[ 13%] Building CXX object src/spider/CMakeFiles/spider_boost_asio.dir/http/backends/boost_asio/request.cpp.o
/home/vorlent/Projects/ElonaFoobar/src/spider/http/backends/boost_asio/request.cpp: In member function ‘void elona::spider::http::{anonymous}::Session::on_shutdown(const error_code&)’:
/home/vorlent/Projects/ElonaFoobar/src/spider/http/backends/boost_asio/request.cpp:389:48: error: ‘SSL_R_SHORT_READ’ was not declared in this scope
                  ERR_GET_REASON(ec.value()) == SSL_R_SHORT_READ))
                                                ^~~~~~~~~~~~~~~~
/home/vorlent/Projects/ElonaFoobar/src/spider/http/backends/boost_asio/request.cpp:389:48: note: suggested alternative: ‘SSL_F_SSL_READ’
                  ERR_GET_REASON(ec.value()) == SSL_R_SHORT_READ))
                                                ^~~~~~~~~~~~~~~~
                                                SSL_F_SSL_READ

再現方法 How to reproduce

make build with openssl 1.1 (default on Arch Linux)

ki-foobar commented 5 years ago

We could use boost::asio::ssl::error::stream_errors::stream_truncated instead.

https://github.com/boostorg/asio/blob/db6423c9b1bd5c5ff4f7ea391446c7ac593ce549/include/boost/asio/ssl/error.hpp#L59