This adds a few message output bits based on IANA TLS registries.

diff --git a/apps/s_cb.c b/apps/s_cb.c
index 2cd7337..833588a 100644
--- a/apps/s_cb.c
+++ b/apps/s_cb.c
@@ -439,6 +439,9 @@ void MS_CALLBACK msg_cb(int write_p, int version, int content_type, const void *
 	    version == DTLS1_VERSION ||
 	    version == DTLS1_BAD_VER)
 		{
+    /* From:
+       http://www.iana.org/assignments/tls-parameters/tls-parameters.xml#tls-parameters-5
+    */
 		switch (content_type)
 			{
 		case 20:
@@ -450,6 +453,12 @@ void MS_CALLBACK msg_cb(int write_p, int version, int content_type, const void *
 		case 22:
 			str_content_type = "Handshake";
 			break;
+		case 23:
+			str_content_type = "ApplicationData";
+			break;
+		case 24:
+			str_content_type = "Heartbeat";
+			break;
 			}
 
 		if (content_type == 21) /* Alert */
@@ -566,6 +575,8 @@ void MS_CALLBACK msg_cb(int write_p, int version, int content_type, const void *
 			{
 			str_details1 = "???";
 
+      /* From: http://www.iana.org/assignments/tls-parameters/tls-parameters.xml#tls-parameters-7
+      */
 			if (len > 0)
 				{
 				switch (((const unsigned char*)buf)[0])
@@ -582,6 +593,9 @@ void MS_CALLBACK msg_cb(int write_p, int version, int content_type, const void *
 				case 3:
 					str_details1 = ", HelloVerifyRequest";
 					break;
+        case 4:
+          str_details1 = ", NewSessionTicket";
+          break;
 				case 11:
 					str_details1 = ", Certificate";
 					break;
@@ -603,6 +617,15 @@ void MS_CALLBACK msg_cb(int write_p, int version, int content_type, const void *
 				case 20:
 					str_details1 = ", Finished";
 					break;
+        case 21:
+          str_details1 = ", CertificateUrl";
+          break;
+        case 22:
+          str_details1 = ", CertificateStatus";
+          break;
+        case 23:
+          str_details1 = ", SupplementalData";
+          break;
 					}
 				}
 			}

Reply via email to