summaryrefslogtreecommitdiffstats
path: root/ssl/s23_clnt.c
diff options
context:
space:
mode:
authorBodo Möller <bodo@openssl.org>2001-11-10 01:16:28 +0000
committerBodo Möller <bodo@openssl.org>2001-11-10 01:16:28 +0000
commitcf82191d77a0a8f77894a65185b6f7a4b3855d6c (patch)
tree0d52136c6f5546efc07b2304104e50391789483b /ssl/s23_clnt.c
parent3a8a0a3945688dea8fa1136db53e2dbfef3b0a9e (diff)
Implement msg_callback for SSL 2.0.
Important SSL 2.0 bugfixes (bugs found while implementing msg_callback).
Diffstat (limited to 'ssl/s23_clnt.c')
-rw-r--r--ssl/s23_clnt.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/ssl/s23_clnt.c b/ssl/s23_clnt.c
index dd2562af15..d74245384a 100644
--- a/ssl/s23_clnt.c
+++ b/ssl/s23_clnt.c
@@ -211,6 +211,7 @@ static int ssl23_client_hello(SSL *s)
unsigned char *buf;
unsigned char *p,*d;
int i,ch_len;
+ int ret;
buf=(unsigned char *)s->init_buf->data;
if (s->state == SSL23_ST_CW_CLNT_HELLO_A)
@@ -302,7 +303,11 @@ static int ssl23_client_hello(SSL *s)
}
/* SSL3_ST_CW_CLNT_HELLO_B */
- return(ssl23_write_bytes(s));
+ ret = ssl23_write_bytes(s);
+ if (ret >= 2)
+ if (s->msg_callback)
+ s->msg_callback(1, SSL2_VERSION, 0, s->init_buf->data+2, ret-2, s, s->msg_callback_arg); /* CLIENT-HELLO */
+ return ret;
}
static int ssl23_get_server_hello(SSL *s)