version 1.40, 2020/01/22 06:40:42 |
version 1.41, 2020/01/23 03:35:54 |
|
|
{ |
{ |
unsigned int off = 0, clr = 0; |
unsigned int off = 0, clr = 0; |
SSL *con = NULL; |
SSL *con = NULL; |
int s, k, p, state = 0, af = AF_UNSPEC; |
int s, k, p, pending, state = 0, af = AF_UNSPEC; |
char *cbuf = NULL, *sbuf = NULL, *mbuf = NULL, *pbuf = NULL; |
char *cbuf = NULL, *sbuf = NULL, *mbuf = NULL, *pbuf = NULL; |
int cbuf_len, cbuf_off; |
int cbuf_len, cbuf_off; |
int sbuf_len, sbuf_off; |
int sbuf_len, sbuf_off; |
|
|
#endif |
#endif |
if (peekaboo) { |
if (peekaboo) { |
k = p = SSL_peek(con, pbuf, 1024 /* BUFSIZZ */ ); |
k = p = SSL_peek(con, pbuf, 1024 /* BUFSIZZ */ ); |
|
pending = SSL_pending(con); |
if (SSL_get_error(con, p) == SSL_ERROR_NONE) { |
if (SSL_get_error(con, p) == SSL_ERROR_NONE) { |
if (p <= 0) |
if (p <= 0) |
goto end; |
goto end; |
|
|
sbuf_off = 0; |
sbuf_off = 0; |
sbuf_len = k; |
sbuf_len = k; |
if (peekaboo) { |
if (peekaboo) { |
|
if (p != pending) { |
|
ret = -1; |
|
BIO_printf(bio_err, |
|
"peeked %d but pending %d!\n", p, pending); |
|
goto shut; |
|
} |
if (k < p) { |
if (k < p) { |
ret = -1; |
ret = -1; |
BIO_printf(bio_err, |
BIO_printf(bio_err, |