user3640472
user3640472

Reputation: 115

To know ssl protocol while connecting from eclipse to maven nexus repo

Is there any way to know, which ssl protocol is using my application while compilation using maven nexus repository?

Upvotes: 4

Views: 2404

Answers (3)

Sandeep Pandey
Sandeep Pandey

Reputation: 1132

Set MAVEN_OPTS="-Djavax.net.debug=all" in environment variable will show you TLS version in log.

Upvotes: 1

Lothar
Lothar

Reputation: 5459

The most readable way to find this out is using a packet sniffer like Wireshark. This tool shows you the packets being exchanged between you and external systems (it doesn't work on localhost) and decodes their meaning, i.e. if TLS is established it shows you the different TLS-messages by name (Client Hello, Server Hello, etc.) and the values of the values in it.

If you don't want to use that (not allowed to, etc.) you can start Eclipse with the system property -Djavax.net.debug=all. This will produce a lot of debug information, you can find some explanation e.g. at Oracle. Instead of all there are other options possible as well. For your particular task, -Djavax.net.debug=ssl:handshake should be sufficient. A list of possible values can be found at IBM

Upvotes: 1

Nikolaj Hansen
Nikolaj Hansen

Reputation: 255

Try to add

-Djavax.net.debug=all

For all net debugging

-Djavax.net.debug=ssl

For SSL debugging.

Which will turn on SSL debugging for a java stack, and print all of the negotiation to the log.

Expand or narrow with

record       enable per-record tracing
handshake    print each handshake message
keygen       print key generation data
session      print session activity
defaultctx   print default SSL initialization
sslctx       print SSLContext tracing
sessioncache print session cache tracing
keymanager   print key manager tracing
trustmanager print trust manager tracing
pluggability print pluggability tracing

handshake debugging can be widened with:
data         hex dump of each handshake message
verbose      verbose handshake message printing

record debugging can be widened with:
plaintext    hex dump of record plaintext
packet       print raw SSL/TLS packets

So for your purpose probably

-Djavax.net.debug=ssl:handshake

For more info refer to Oracles documetation here

http://docs.oracle.com/javase/8/docs/technotes/guides/security/jsse/ReadDebug.html

Upvotes: 3

Related Questions