ret = BIO_read(bio, buf, (int)max_length);
} while (ret <= 0 && BIO_should_retry(bio));
+ if (BIO_get_ssl(bio, &ssl) == 1)
+ {
+ fd = SSL_get_fd(ssl);
+ }
+
if (ret < 0)
{
log_ssl_errors(LOG_LEVEL_ERROR,
return -1;
}
- if (BIO_get_ssl(bio, &ssl) == 1)
- {
- fd = SSL_get_fd(ssl);
- }
-
log_error(LOG_LEVEL_RECEIVED, "TLS from socket %d: %N",
fd, ret, buf);