summaryrefslogtreecommitdiffstats
path: root/ssl/s2_lib.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/s2_lib.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/s2_lib.c')
-rw-r--r--ssl/s2_lib.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/ssl/s2_lib.c b/ssl/s2_lib.c
index aaca270fc6..bce2b4e83f 100644
--- a/ssl/s2_lib.c
+++ b/ssl/s2_lib.c
@@ -470,10 +470,14 @@ void ssl2_write_error(SSL *s)
if (i < 0)
s->error=error;
- else if (i != s->error)
+ else
+ {
s->error=error-i;
- /* else
- s->error=0; */
+
+ if (s->error == 0)
+ if (s->msg_callback)
+ s->msg_callback(1, s->version, 0, buf, 3, s, s->msg_callback_arg); /* ERROR */
+ }
}
int ssl2_shutdown(SSL *s)