JwtsSigningKeyResolver implements SigningKeyResolver { SSLSocketFactory getSocketFactory(SSLContext sslContext) { return (sslContext == null) ? null : sslContext.getSocketFactory(); } JwtsSigningKeyResolver(final String serverUrl, final SSLContext sslContext);  JwtsSigningKeyResolver(final String serverUrl, final SSLContext sslContext, boolean skipConfig); @Override Key resolveSigningKey(JwsHeader jwsHeader, Claims claims); @Override Key resolveSigningKey(JwsHeader jwsHeader, String body); void addPublicKey(final String keyId, final PublicKey publicKey); static final String ZTS_PROP_ATHENZ_CONF; }
@Test public void testGetSocketFactory() { final String oldConf = System.setProperty(JwtsSigningKeyResolver.ZTS_PROP_ATHENZ_CONF, "src/test/resources/athenz.conf"); JwtsSigningKeyResolver resolver = new JwtsSigningKeyResolver(null, null); assertNull(resolver.getSocketFactory(null)); if (oldConf == null) { System.clearProperty(JwtsSigningKeyResolver.ZTS_PROP_ATHENZ_CONF); } else { System.setProperty(JwtsSigningKeyResolver.ZTS_PROP_ATHENZ_CONF, oldConf); } }