[JAVA-2640] Get information about SSL connection Created: 18/Oct/17  Updated: 11/Sep/19  Resolved: 08/Nov/17

Status: Closed
Project: Java Driver
Component/s: API
Affects Version/s: 3.5.0
Fix Version/s: None

Type: Task Priority: Minor - P4
Reporter: Stefan Siegl Assignee: Unassigned
Resolution: Done Votes: 0
Labels: Security
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

MongoDB >3.2



 Description   

Hello,

is there a way with the java driver to get information about the ssl connection? I wan´t to log a message how long the certificate is valid during the first connection to mongodb. Do you have any idea, how I can realize it?

BR
Stefan



 Comments   
Comment by Jeffrey Yemin [ 08/Nov/17 ]

There is no way to do this through the Java driver as any information on x509 certificates is abstracted by the SSLContext API that the driver depends on.

The only way I know to accomplish what you want at runtime is to enable debug logging for SSL when starting the JVM. See the JSSE Debugging Utilities Guide for further information.

Generated at Thu Feb 08 08:57:43 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.