How to decipher a boost asio ssl error code?

后端 未结 2 454
梦毁少年i
梦毁少年i 2021-01-04 18:49

I\'ve got an occasional communications failure in a boost asio ssl implementation, the super helpful error message returned by boost is \'asio.ssl:336458004\'

I susp

2条回答
  •  暖寄归人
    2021-01-04 19:21

    I eventually gained some insight into the problem by building openssl in debug and putting a breakpoint on the OpenSSL error reporting function ERR_put_error.

    The callstack showed that the problem was originating from SSL_read, caused by the fact that the handshake function had not been initialized. The actual error number used by the ERR_put_error function is 276, how boost manages to mangle this into 336458004 is beyond me. The bug itself was caused by a a global flag which I was using to toggle the SSL functions as I tunnel through a proxy onto a remote HTTPS server.

    Hope this helps someone.

提交回复
热议问题