s_client(1) and s_server(1) have this very useful option:
Changes between 1.0.1l and 1.0.2 [22 Jan 2015]
...
*) SSL/TLS tracing code. This parses out SSL/TLS records using the
message callback and prints the results. Needs compile time option
"enable-ssl-trace". New options to s_client and s_server to enable
tracing.
[Steve Henson]
It is especially handy when looking at TLS handshakes, e.g. to try
figure out why nc(1)/libtls TLSv1.3 fails but openssl(1)/libssl doesn't.
LibreSSL's openssl(1) has
-msg
Show all protocol messages with hex dump.
but it is not nearly insightful as OpenSSL's s_client(1)
-trace
Show verbose trace output of protocol messages. OpenSSL needs
to be compiled with enable-ssl-trace for this option to work.
Example:
$ eopenssl11 s_client -connect openbsd.org:https -trace
...
Sent Record
Header:
Version = TLS 1.0 (0x301)
Content Type = Handshake (22)
Length = 308
ClientHello, Length=304
client_version=0x303 (TLS 1.2)
Random:
gmt_unix_time=0x2DF3347B
random_bytes (len=28): 14FF033F71658E129A74930FE7E8F48B00A9F9C9C4FC006B4279DEDA
session_id (len=32): 3B5F9F5EC4DB2D69864B950885763AF99429FBE2063D429A7AA0629E14283B8F
cipher_suites (len=62)
{0x13, 0x02} TLS_AES_256_GCM_SHA384
...
Feedback? Objections? OK?
Index: Makefile
===================================================================
RCS file: /cvs/ports/security/openssl/1.1/Makefile,v
retrieving revision 1.28
diff -u -p -r1.28 Makefile
--- Makefile 25 Mar 2021 14:54:12 -0000 1.28
+++ Makefile 24 Jun 2021 07:07:11 -0000
@@ -4,6 +4,7 @@
PORTROACH= limit:^1\.1\.[0-9][a-z] skipb:0 skipv:1.1.1
V= 1.1.1k
PKGSPEC= openssl->=1.1.0,<1.2
+REVISION= 0
SHLIBVER= 11.6
SHARED_LIBS= crypto ${SHLIBVER} \
@@ -21,6 +22,7 @@ CONFIGURE_STYLE= simple
CONFIGURE_SCRIPT= config
CONFIGURE_ARGS+= --prefix=${PREFIX} \
--openssldir=${PREFIX}/share/eopenssl11 \
+ enable-ssl-trace \
no-threads no-rc5 no-ssl3 \
no-devcryptoeng \
shared
No comments:
Post a Comment