diff --git a/.release-notes/105.md b/.release-notes/105.md new file mode 100644 index 0000000..bf8b50b --- /dev/null +++ b/.release-notes/105.md @@ -0,0 +1,5 @@ +## Fix bug when using OpenSSL 3.2 + +OpenSSL 3.2 introduced a bug in itself or exposed one in NetSSL via a change in behavior. We believe the bug is in OpenSSL, either way, it was a problem. + +HTTPS using the [Ponylang HTTP library](https://github.com/ponylang/http) get requests would hang when in release mode and segfault due to infinite recurion when in debug mode. We've introduced a fix and a regression test has been added to `ponylang/http`. diff --git a/net_ssl/ssl.pony b/net_ssl/ssl.pony index edbd22b..6c62571 100755 --- a/net_ssl/ssl.pony +++ b/net_ssl/ssl.pony @@ -150,7 +150,9 @@ class SSL if r <= 0 then match @SSL_get_error(_ssl, r) - | 1 | 5 | 6 => _state = SSLError + | 1 | 5 | 6 => + _state = SSLError + return None | 2 => // SSL buffer has more data but it is not yet decoded (or something) _read_buf.truncate(offset)