diff options
author | Kazuki Yamaguchi <k@rhe.jp> | 2016-11-13 22:18:00 +0900 |
---|---|---|
committer | Kazuki Yamaguchi <k@rhe.jp> | 2016-11-13 23:10:16 +0900 |
commit | 072d53ecf9844d4080d7fffdf5ef9434d0a9ab82 (patch) | |
tree | 4dc79c2149fcb4403c3ca15133838abb1649ed8a /ext/openssl/ossl_digest.c | |
parent | c86e2aa39760dc1f9c93ff63084d12d1a950a306 (diff) | |
download | ruby-openssl-072d53ecf9844d4080d7fffdf5ef9434d0a9ab82.tar.gz |
ssl: workaround for new behavior of SSL_read() in OpenSSL >= 1.1.0c
Commit 4880672a9b41 of OpenSSL[1] (which then was backported to 1.1.0
branch at 122580ef71e4) changed the bahavior of SSL_read(): it now
returns -1 in the case the underlying BIO reaches EOF unexpectedly. This
means, it is possible that rb_sys_fail() is called with errno == 0,
resulting in [BUG].
So, as a workaround, let's distinguish IO error from the underlying BIO
and EOF in violation of SSL/TLS protocol with the value of errno.
[1] https://git.openssl.org/?p=openssl.git;a=commit;h=4880672a9b41a09a0984b55e219f02a2de7ab75e
Diffstat (limited to 'ext/openssl/ossl_digest.c')
0 files changed, 0 insertions, 0 deletions