From f1d3dac5a363a71512c7a84943eb26f30e0b96de Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Fri, 22 Sep 2023 15:21:19 +0200 Subject: [thrift] Add getter for sat ssl context --- src/main/java/org/openslx/thrifthelper/ThriftManager.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/main/java/org/openslx/thrifthelper/ThriftManager.java b/src/main/java/org/openslx/thrifthelper/ThriftManager.java index 4971b97..07256b2 100644 --- a/src/main/java/org/openslx/thrifthelper/ThriftManager.java +++ b/src/main/java/org/openslx/thrifthelper/ThriftManager.java @@ -55,6 +55,7 @@ public class ThriftManager private static ErrorCallback satErrorCallback = null; private static ErrorCallback masterErrorCallback = null; + private static SSLContext satSslContext = null; /** * Sets the address of the master server @@ -106,6 +107,7 @@ public class ThriftManager LOGGER.error( "Given address is empty." ); return false; } + satSslContext = ctx; // finally set it satelliteManager = new ThriftManager( SatelliteServer.Iface.class, SatelliteServer.Client.class, new WantClientCallback() { @@ -123,6 +125,14 @@ public class ThriftManager } ); return true; } + + /** + * Get the SSL context used for talking to the satellite server (if any) + */ + public static SSLContext getSatelliteSslContext() + { + return satSslContext; + } /** * Returns the singleton client of the thrift connection to the satellite -- cgit v1.2.3-55-g7522