Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 608
user3640472 Avatar asked Nov 01 '25 12:11

user3640472


2 Answers

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

like image 172
Nikolaj Hansen Avatar answered Nov 03 '25 02:11

Nikolaj Hansen


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

like image 35
Lothar Avatar answered Nov 03 '25 01:11

Lothar



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!