/* Copyright (c) 2009-2018 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "istream-private.h"
#include "iostream-openssl.h"
struct ssl_istream {
bool seen_eof;
};
bool close_parent)
{
if (close_parent)
}
{
}
{
return -1;
}
if (ret <= 0) {
if (ret < 0) {
/* handshake failed */
}
return ret;
}
return -2;
/* failed to read anything */
OPENSSL_IOSTREAM_SYNC_TYPE_CONTINUE_READ, "SSL_read");
if (ret <= 0) {
if (ret == 0)
return 0;
}
return -1;
}
/* we did some BIO I/O, try reading again */
}
/* now make sure that we read everything already buffered in OpenSSL
into the stream (without reading anything more). this makes I/O loop
behave similarly for ssl-istream as file-istream. */
}
return total_ret;
}
{
}
return ret;
}
{
}