Fixes bug #4528 "read_to_buf_tls(): Inconsistency in code".
This check was added back in 0.1.0.3-rc, but somehow we forgot to
leave it in when we refactored read_to_buf_tls in 0.1.0.5-rc.
(patch by Arturo; commit message and changes file by nickm)
--- /dev/null
+
+ o Minor bugfixes:
+ - Make sure that there are no unhandled pending TLS errors before
+ reading from a TLS stream. We had checks in 0.1.0.3-rc, but
+ lost them in 0.1.0.5-rc when we refactored read_to_buf_tls().
+ Bugfix on 0.1.0.5-rc; fixes bug 4528.
{
int r = 0;
size_t total_read = 0;
+
+ check_no_tls_errors();
+
check();
while (at_most > total_read) {