diff options
author | Jakob Heher <jakob.heher@iaik.tugraz.at> | 2022-07-06 12:33:33 +0200 |
---|---|---|
committer | Jakob Heher <jakob.heher@iaik.tugraz.at> | 2022-07-06 12:33:33 +0200 |
commit | e4767bccc7324d4b61a334bf6c0558d0080045e2 (patch) | |
tree | 728a5df44f02ca10f760b979873c990cd4c0d265 /pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/TrustedSocketFactory.java | |
parent | 3422e5eb2819f5de304f25dc622f5284813bb9b4 (diff) | |
download | pdf-over-e4767bccc7324d4b61a334bf6c0558d0080045e2.tar.gz pdf-over-e4767bccc7324d4b61a334bf6c0558d0080045e2.tar.bz2 pdf-over-e4767bccc7324d4b61a334bf6c0558d0080045e2.zip |
remove NON-NLS comments, cleanup whitespace
Diffstat (limited to 'pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/TrustedSocketFactory.java')
-rw-r--r-- | pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/TrustedSocketFactory.java | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/TrustedSocketFactory.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/TrustedSocketFactory.java index 7b465b25..ff9b48a0 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/TrustedSocketFactory.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/TrustedSocketFactory.java @@ -39,7 +39,7 @@ import org.slf4j.LoggerFactory; import at.asit.pdfover.commons.Messages; /** - * + * */ public class TrustedSocketFactory implements SecureProtocolSocketFactory { /** @@ -49,15 +49,15 @@ public class TrustedSocketFactory implements SecureProtocolSocketFactory { .getLogger(TrustedSocketFactory.class); private static final String ENABLED_CS[] = { - "TLS_RSA_WITH_AES_128_CBC_SHA", //$NON-NLS-1$ - "SSL_RSA_WITH_RC4_128_SHA", //$NON-NLS-1$ - "SSL_RSA_WITH_3DES_EDE_CBC_SHA", //$NON-NLS-1$ - "SSL_RSA_WITH_RC4_128_MD5" //$NON-NLS-1$ + "TLS_RSA_WITH_AES_128_CBC_SHA", // + "SSL_RSA_WITH_RC4_128_SHA", // + "SSL_RSA_WITH_3DES_EDE_CBC_SHA", // + "SSL_RSA_WITH_RC4_128_MD5" // }; private static SSLSocketFactory getFactory() throws NoSuchAlgorithmException, KeyManagementException, Exception { - SSLContext sslContext = SSLContext.getInstance("TLS"); //$NON-NLS-1$ + SSLContext sslContext = SSLContext.getInstance("TLS"); // sslContext.init(null, new TrustManager[] { new SimpleXMLTrustManager() }, new java.security.SecureRandom()); @@ -66,7 +66,7 @@ public class TrustedSocketFactory implements SecureProtocolSocketFactory { /* * (non-Javadoc) - * + * * @see * org.apache.commons.httpclient.protocol.ProtocolSocketFactory#createSocket * (java.lang.String, int) @@ -80,21 +80,21 @@ public class TrustedSocketFactory implements SecureProtocolSocketFactory { sslSocket.setEnabledCipherSuites(ENABLED_CS); return sslSocket; } catch (Exception ex) { - log.error("TrustedSocketFactory: ", ex); //$NON-NLS-1$ + log.error("TrustedSocketFactory: ", ex); // if (ex instanceof IOException) { throw (IOException) ex; } else if (ex instanceof UnknownHostException) { throw (UnknownHostException) ex; } else { throw new IOException( - Messages.getString("TrustedSocketFactory.FailedToCreateSecureConnection"), ex); //$NON-NLS-1$ + Messages.getString("TrustedSocketFactory.FailedToCreateSecureConnection"), ex); // } } } /* * (non-Javadoc) - * + * * @see * org.apache.commons.httpclient.protocol.ProtocolSocketFactory#createSocket * (java.lang.String, int, java.net.InetAddress, int) @@ -108,21 +108,21 @@ public class TrustedSocketFactory implements SecureProtocolSocketFactory { sslSocket.setEnabledCipherSuites(ENABLED_CS); return sslSocket; } catch (Exception ex) { - log.error("TrustedSocketFactory: ", ex); //$NON-NLS-1$ + log.error("TrustedSocketFactory: ", ex); // if (ex instanceof IOException) { throw (IOException) ex; } else if (ex instanceof UnknownHostException) { throw (UnknownHostException) ex; } else { throw new IOException( - Messages.getString("TrustedSocketFactory.FailedToCreateSecureConnection"), ex); //$NON-NLS-1$ + Messages.getString("TrustedSocketFactory.FailedToCreateSecureConnection"), ex); // } } } /* * (non-Javadoc) - * + * * @see * org.apache.commons.httpclient.protocol.ProtocolSocketFactory#createSocket * (java.lang.String, int, java.net.InetAddress, int, @@ -134,7 +134,7 @@ public class TrustedSocketFactory implements SecureProtocolSocketFactory { UnknownHostException, ConnectTimeoutException { try { if (params == null) { - throw new IllegalArgumentException("Parameters may not be null"); //$NON-NLS-1$ + throw new IllegalArgumentException("Parameters may not be null"); // } int timeout = params.getConnectionTimeout(); SSLSocket sslSocket = null; @@ -154,14 +154,14 @@ public class TrustedSocketFactory implements SecureProtocolSocketFactory { sslSocket.setEnabledCipherSuites(ENABLED_CS); return sslSocket; } catch (Exception ex) { - log.error("TrustedSocketFactory: ", ex); //$NON-NLS-1$ + log.error("TrustedSocketFactory: ", ex); // if (ex instanceof IOException) { throw (IOException) ex; } else if (ex instanceof UnknownHostException) { throw (UnknownHostException) ex; } else { throw new IOException( - Messages.getString("TrustedSocketFactory.FailedToCreateSecureConnection"), ex); //$NON-NLS-1$ + Messages.getString("TrustedSocketFactory.FailedToCreateSecureConnection"), ex); // } } } @@ -177,14 +177,14 @@ public class TrustedSocketFactory implements SecureProtocolSocketFactory { sslSocket.setEnabledCipherSuites(ENABLED_CS); return sslSocket; } catch (Exception ex) { - log.error("TrustedSocketFactory: ", ex); //$NON-NLS-1$ + log.error("TrustedSocketFactory: ", ex); // if (ex instanceof IOException) { throw (IOException) ex; } else if (ex instanceof UnknownHostException) { throw (UnknownHostException) ex; } else { throw new IOException( - Messages.getString("TrustedSocketFactory.FailedToCreateSecureConnection"), ex); //$NON-NLS-1$ + Messages.getString("TrustedSocketFactory.FailedToCreateSecureConnection"), ex); // } } } |