- Fix test with https zone for libressl.

This commit is contained in:
W.C.A. Wijngaards
2026-04-20 16:10:33 +02:00
parent eb2fe8df8d
commit e1d146d6b0
2 changed files with 18 additions and 2 deletions
+1
View File
@@ -1,6 +1,7 @@
20 April 2026: Wouter
- Fix compile warnings for thread setname routine, and test compile.
- Fix unused variable warning when compiled without ssl.
- Fix test with https zone for libressl.
17 April 2026: Wouter
- Fix setup of ssl context copy of the tls service pem option,
+17 -2
View File
@@ -160,11 +160,26 @@ read_ssl_line(SSL* ssl, char* buf, size_t len)
return 0;
}
if((r = SSL_read(ssl, buf+n, 1)) <= 0) {
if(SSL_get_error(ssl, r) == SSL_ERROR_ZERO_RETURN) {
int e = SSL_get_error(ssl, r);
if(e == SSL_ERROR_ZERO_RETURN) {
/* EOF */
break;
} else if(e == SSL_ERROR_WANT_READ) {
continue;
} else if(e == SSL_ERROR_WANT_WRITE) {
continue;
} else if(e == SSL_ERROR_SYSCALL) {
if(verb) printf("could not SSL_read %s\n",
strerror(errno));
} else if(e == SSL_ERROR_SSL) {
int er = ERR_peek_error();
if(er)
printf("could not SSL_read: %s\n",
ERR_reason_error_string(er));
} else {
if(verb) printf("could not SSL_read "
"(SSL_get_error %d)\n", e);
}
if(verb) printf("could not SSL_read\n");
return 0;
}
if(endnl && buf[n] == '\n') {