From 7bb3542bc8b893bbc0a170560d81377f541bfcc0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Henrik=20Grubbstr=C3=B6m=20=28Grubba=29?=
 <grubba@grubba.org>
Date: Tue, 21 Apr 1998 23:28:57 +0200
Subject: [PATCH] Added some more debug.

Rev: lib/modules/SSL.pmod/handshake.pike:1.8
---
 lib/modules/SSL.pmod/handshake.pike | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/lib/modules/SSL.pmod/handshake.pike b/lib/modules/SSL.pmod/handshake.pike
index ac77941ee9..d3aa4d8c78 100644
--- a/lib/modules/SSL.pmod/handshake.pike
+++ b/lib/modules/SSL.pmod/handshake.pike
@@ -1,4 +1,4 @@
-/* $Id: handshake.pike,v 1.7 1998/04/20 01:49:37 nisse Exp $
+/* $Id: handshake.pike,v 1.8 1998/04/21 21:28:57 grubba Exp $
  *
  */
 
@@ -318,7 +318,8 @@ int handle_handshake(int type, string data, string raw)
 	int id_len;
 	int ch_len;
 	array(int) version;
-	if (catch{
+	mixed err;
+	if (err = catch{
 	  version = input->get_fix_uint_array(1, 2);
 	  ci_len = input->get_uint(2);
 	  id_len = input->get_uint(2);
@@ -326,6 +327,10 @@ int handle_handshake(int type, string data, string raw)
 	} || (ci_len % 3) || !ci_len || (id_len) || (ch_len < 16)
 	|| (version[0] != 3))
 	{
+#ifdef SSL3_DEBUG
+	  werror(sprintf("SSL.handshake: Error decoding SSL2 handshake:\n"
+			 "%s\n", describe_backtrace(err)));
+#endif /* SSL3_DEBUG */
 	  send_packet(Alert(ALERT_fatal, ALERT_unexpected_message));
 	  return -1;
 	}
-- 
GitLab