SmartOS: Serious issue with openjdk 17 and TLS
This post transcribes some emails I sent to several mailing lists:
The initial email was sent to the Kafka User mailing list:
Reply-To: users@kafka.apache.org Message-ID: <92aa6286-d875-04ed-6205-9e4a8fe3a1a1@jcea.es> Date: Thu, 9 Nov 2023 03:37:39 +0100 To: users@kafka.apache.org From: Jesus Cea <jcea@jcea.es> Subject: How to get a X509 broker certificate with "openssl s_client"? I am trying to remotely access to the brokers certificates (for audit purposes, expiration alarms, etc) using this command: """ openssl s_client -showcerts -connect localhost:9092 """ The connection is correctly established, but something is wrong. The TLS session is has some errors at the beginning, but it success at the end: """ [jcea@Kafka ~]$ openssl s_client -showcerts -connect localhost:9092 CONNECTED(00000004) 1:error:1408F119:SSL routines:ssl3_get_record:decryption failed or bad record mac:ssl/record/ssl3_record.c:676: --- no peer certificate available --- No client certificate CA names sent Server Temp Key: X25519, 253 bits --- SSL handshake has read 1696 bytes and written 300 bytes Verification: OK --- New, TLSv1.3, Cipher is TLS_AES_256_GCM_SHA384 Secure Renegotiation IS NOT supported Compression: NONE Expansion: NONE No ALPN negotiated Early data was not sent Verify return code: 0 (ok) --- """ I tried too writing a tiny TLS client in Python, same result, raising this exception: "ssl.SSLError: [SSL: DECRYPTION_FAILED_OR_BAD_RECORD_MAC] decryption failed or bad record mac (_ssl.c:992)". I guess there is some kind of preamble before TLS negotiation. Is that documented somewhere?. How can I check remotely the brokers' certificates? Thanks.