summaryrefslogtreecommitdiffstats
path: root/ssl/ssl_lib.c
diff options
context:
space:
mode:
authorBodo Möller <bodo@openssl.org>2001-03-08 21:54:02 +0000
committerBodo Möller <bodo@openssl.org>2001-03-08 21:54:02 +0000
commit5451e0d924e869d05065e7e48b36cbbde6d22838 (patch)
treefa7da7ac7b0f78107ff514c4e63c638013a2e2bd /ssl/ssl_lib.c
parent4ea38555148b23639e8c3e44b70bccbc765b9aa5 (diff)
add ssl23_peek
Diffstat (limited to 'ssl/ssl_lib.c')
-rw-r--r--ssl/ssl_lib.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c
index 1edb279dc8..9a593ed2a5 100644
--- a/ssl/ssl_lib.c
+++ b/ssl/ssl_lib.c
@@ -784,6 +784,12 @@ int SSL_read(SSL *s,char *buf,int num)
int SSL_peek(SSL *s,char *buf,int num)
{
+ if (s->handshake_func == 0)
+ {
+ SSLerr(SSL_F_SSL_READ, SSL_R_UNINITIALIZED);
+ return -1;
+ }
+
if (s->shutdown & SSL_RECEIVED_SHUTDOWN)
{
return(0);