/**
* Logger for SslTrustManagerFactory
*/
- public static final Logger logger = LoggerFactory.getLogger(SslTrustManagerFactory.class);
+ public static final Logger LOGGER = LoggerFactory.getLogger(SslTrustManagerFactory.class);
private static final TrustManager DUMMY_TRUST_MANAGER = new X509TrustManager() {
@Override
public X509Certificate[] getAcceptedIssuers() {
@Override
public void checkClientTrusted(X509Certificate[] chain, String authType) {
- logger.error("UNKNOWN CLIENT CERTIFICATE: " + chain[0].getSubjectDN());
+ LOGGER.error("UNKNOWN CLIENT CERTIFICATE: " + chain[0].getSubjectDN());
}
@Override
public void checkServerTrusted(X509Certificate[] chain, String authType) {
- logger.error("UNKNOWN SERVER CERTIFICATE: " + chain[0].getSubjectDN());
+ LOGGER.error("UNKNOWN SERVER CERTIFICATE: " + chain[0].getSubjectDN());
}
};
*/
public final class ClientSslKeyStore {
- private static final String filename = "/selfSignedSwitch";
+ private static final String KEY_STORE_FILENAME = "/selfSignedSwitch";
private ClientSslKeyStore() {
throw new UnsupportedOperationException("Utility class shouldn't be instantiated");
* @return key as InputStream
*/
public static InputStream asInputStream() {
- InputStream in = ClientSslKeyStore.class.getResourceAsStream(filename);
+ InputStream in = ClientSslKeyStore.class.getResourceAsStream(KEY_STORE_FILENAME);
if (in == null) {
- throw new IllegalStateException("KeyStore file not found: " + filename);
+ throw new IllegalStateException("KeyStore file not found: " + KEY_STORE_FILENAME);
}
return in;
}
*/
public final class ClientSslTrustStore {
- private static final String filename = "/selfSignedController";
+ private static final String KEY_STORE_FILENAME = "/selfSignedController";
private ClientSslTrustStore() {
throw new UnsupportedOperationException("Utility class shouldn't be instantiated");
* @return key as InputStream
*/
public static InputStream asInputStream() {
- InputStream in = ClientSslTrustStore.class.getResourceAsStream(filename);
+ InputStream in = ClientSslTrustStore.class.getResourceAsStream(KEY_STORE_FILENAME);
if (in == null) {
- throw new IllegalStateException("KeyStore file not found: " + filename);
+ throw new IllegalStateException("KeyStore file not found: " + KEY_STORE_FILENAME);
}
return in;
}