I have a working client/server scenario using socat
with the following commands:
Server
socat openssl-listen:5000,reuseaddr,cert=server.pem,cafile=server.crt,verify=0 STDIO
Client
socat stdio openssl-connect:localhost:5000,cert=server.pem,cafile=server.crt,verify=0
This is part of a larger system, but the commands above work well for what we are trying to achieve. However, I need to ensure that TLS v1.3 is in use, and ensure it is the only version of encryption being used. I can ensure version 1.2 is used using something like:
socat - OPENSSL-LISTEN:443,method=TLS1.2,verify=0,cert=cert.pem,key=key.pem
openssl is at the latest (1.1.1 version), which is supposed to support TLS1.3
At time of writing (Feb 2020), almost all the documentation I can find for socat only makes reference to setting TLS1.2, and no reference to TLS1.3. For the openssl
command line, you can set -tls1_3
, for instance:
openssl s_server -accept 443 -tls1_3 -ciphersuites TLS_AES_256_GCM_SHA384 -key key.pem -cert cert.pem
[1] https://8gwifi.org/docs/tlsv13.jsp
This command works (alongside the relevant s_client
command), but I cannot get the same parameters passed in through socat.