user1424739
user1424739

Reputation: 13775

What is the equivalence of SSLKEYLOGFILE in a Java program?

Where is SSLKEYLOGFILE defined?

As discussed above, SSLKEYLOGFILE can be used with some program to capture the key log.

But Java programs using TLS do not respect this environment variable. What is the correct way to let such a Java program dump the key log? (I think Java program most likely uses the following package for TLS. But I am not completely sure.)

https://hc.apache.org/httpcomponents-core-4.4.x/current/httpcore/apidocs/org/apache/http/ssl/package-summary.html

Upvotes: 7

Views: 3819

Answers (2)

botismarius
botismarius

Reputation: 3045

As suggested by this wireshark topic, there exists a Java agent that can provide the same functionality: https://github.com/neykov/extract-tls-secrets.

I tested it by providing the agent in the command line and it works for my use-case (TLS v1.3)

Upvotes: 7

ok2c
ok2c

Reputation: 27613

All versions of Apache HttpClient use the standard JSSE framework for their TLS transport security. Please refer to the JSSE documentation for details on SSL/TLS debug logging (per @VGR original suggestion)

https://docs.oracle.com/javase/7/docs/technotes/guides/security/jsse/ReadDebug.html

Upvotes: 1

Related Questions