c++ – Why am I get bad length error when using asio ssl stream?
I use boost::asio::ssl::streamboost::asio::ip::tcp::socket and strand to post my write/read handler.but when I try to send some data, write_handler always get the following errors, anyone can help me? Does ssl stream have any limitation?
** errcode:unspecified system error, reason: (0,0,2) error:00000002:lib(0):func(0):system lib
[2021-12-10 10:08:45.206953449] [27440] [ERRO] [E:bakkbcommonHXAsioComm.cpp:150 HXAsioComm.HandleSend] **** errcode:unspecified system error, reason: (0,0,2) error:00000002:lib(0):func(0):system lib
[2021-12-10 10:08:45.206958091] [27440] [ERRO] [E:bakkbcommonHXAsioComm.cpp:150 HXAsioComm.HandleSend] **** errcode:unspecified system error, reason: (0,0,2) error:00000002:lib(0):func(0):system lib
[2021-12-10 10:08:45.206962671] [27440] [ERRO] [E:bakkbcommonHXAsioComm.cpp:150 HXAsioComm.HandleSend] **** errcode:unspecified system error, reason: (0,0,2) error:00000002:lib(0):func(0):system lib
[2021-12-10 10:08:45.206976224] [27440] [ERRO] [E:bakkbcommonHXAsioComm.cpp:150 HXAsioComm.HandleSend] **** errcode:bad length, reason: (20,158,271) error:1409E10F:SSL routines:ssl3_write_bytes:bad length
[2021-12-10 10:08:45.207231418] [27440] [ERRO] [E:bakkbcommonHXAsioComm.cpp:150 HXAsioComm.HandleSend] **** errcode:unspecified system error, reason: (0,0,2) error:00000002:lib(0):func(0):system lib
[2021-12-10 10:08:45.207260054] [27440] [ERRO] [E:bakkbcommonHXAsioComm.cpp:150 HXAsioComm.HandleSend] **** errcode:bad length, reason: (20,158,271) error:1409E10F:SSL routines:ssl3_write_bytes:bad length
[2021-12-10 10:08:45.207591794] [27440] [ERRO] [E:bakkbcommonHXAsioComm.cpp:150 HXAsioComm.HandleSend] **** errcode:bad length, reason: (20,158,271) error:1409E10F:SSL routines:ssl3_write_bytes:bad length
[2021-12-10 10:08:45.207722644] [27440] [ERRO] [E:bakkbcommonHXAsioComm.cpp:150 HXAsioComm.HandleSend] **** errcode:unspecified system error, reason: (0,0,2) error:00000002:lib(0):func(0):system lib
[2021-12-10 10:08:45.207990530] [27440] [ERRO] [E:bakkbcommonHXAsioComm.cpp:150 HXAsioComm.HandleSend] **** errcode:unspecified system error, reason: (0,0,2) error:00000002:lib(0):func(0):system lib
Read more here: Source link