revert SUITEB128ONLY patch, anything wanting to use P-384 can use SUITEB128 instead
[openssl.git] / ssl / t1_trce.c
index 2c8a2e44865a6afed3a7bab6b026680503b8fe11..b8651641a36d2318574b7f6ebbd834f169b1f312 100644 (file)
@@ -1071,7 +1071,7 @@ static int ssl_print_cert_request(BIO *bio, int indent, SSL *s,
                nm = d2i_X509_NAME(NULL, &p, dlen);
                if (!nm)
                        {
-                       BIO_puts(bio, "<UNPARESABLE DN>\n");
+                       BIO_puts(bio, "<UNPARSEABLE DN>\n");
                        }
                else
                        {
@@ -1224,18 +1224,19 @@ void SSL_trace(int write_p, int version, int content_type,
                                msg, msglen);
                return;
                }
-
-       BIO_printf(bio, "%s Record: Version = %s (0x%x)",
-                               write_p ? "Sent" : "Received",
-                               ssl_trace_str(version, ssl_version_tbl),
-                               version);
-       BIO_printf(bio, " Length=%d\n", (int)msglen);
-       BIO_printf(bio, "  Content Type = %s (%d)\n",
-                               ssl_trace_str(content_type, ssl_content_tbl),
-                               content_type);
-
        switch (content_type)
                {
+       case SSL3_RT_HEADER:
+               {
+               int hvers = msg[1] << 8 | msg[2];
+               BIO_puts(bio, write_p ? "Sent" : "Received");
+               BIO_printf(bio, " Record\nHeader:\n  Version = %s (0x%x)\n",
+                               ssl_trace_str(hvers, ssl_version_tbl), hvers);
+               BIO_printf(bio, "  Content Type = %s (%d)\n  Length = %d",
+                               ssl_trace_str(msg[0], ssl_content_tbl), msg[0],
+                               msg[3] << 8 | msg[4]);
+               }
+               break;
        case SSL3_RT_HANDSHAKE:
                if (!ssl_print_handshake(bio, ssl, msg, msglen, 4))
                        BIO_printf(bio, "Message length parse error!\n");