summaryrefslogtreecommitdiff
path: root/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/SimpleXMLTrustManager.java
diff options
context:
space:
mode:
authorJakob Heher <jakob.heher@iaik.tugraz.at>2022-07-06 12:52:15 +0200
committerJakob Heher <jakob.heher@iaik.tugraz.at>2022-07-06 12:52:15 +0200
commit82c045d786ef4a0728c1e89fb365afda81aef303 (patch)
treeb6396536f273986777862c88ff15124f9d8a84ee /pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/SimpleXMLTrustManager.java
parentf4c665e207973856578c2ad75de4df39b7bca641 (diff)
downloadpdf-over-82c045d786ef4a0728c1e89fb365afda81aef303.tar.gz
pdf-over-82c045d786ef4a0728c1e89fb365afda81aef303.tar.bz2
pdf-over-82c045d786ef4a0728c1e89fb365afda81aef303.zip
remove leftover empty comments after e4767bccc7324d4b61a334bf6c0558d0080045e2
Diffstat (limited to 'pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/SimpleXMLTrustManager.java')
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/SimpleXMLTrustManager.java24
1 files changed, 12 insertions, 12 deletions
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/SimpleXMLTrustManager.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/SimpleXMLTrustManager.java
index 08385456..f529d658 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/SimpleXMLTrustManager.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/SimpleXMLTrustManager.java
@@ -64,7 +64,7 @@ public class SimpleXMLTrustManager implements X509TrustManager {
public SimpleXMLTrustManager() throws Exception {
// create a "default" JSSE X509TrustManager.
- TrustManagerFactory tmf = TrustManagerFactory.getInstance("SunX509"); //
+ TrustManagerFactory tmf = TrustManagerFactory.getInstance("SunX509");
tmf.init((KeyStore) null);
TrustManager tms[] = tmf.getTrustManagers();
@@ -94,8 +94,8 @@ public class SimpleXMLTrustManager implements X509TrustManager {
NodeList certificateList = certificates.getChildNodes();
try {
- if (!certificates.getNodeName().equals("certificates")) { //
- throw new Exception("Used certificates xml is invalid! no certificates node"); //
+ if (!certificates.getNodeName().equals("certificates")) {
+ throw new Exception("Used certificates xml is invalid! no certificates node");
}
//add trusted certificates to certStore//
@@ -104,26 +104,26 @@ public class SimpleXMLTrustManager implements X509TrustManager {
Node certificateNode = certificateList.item(i);
- if (certificateNode.getNodeName().equals("#text")) { //
+ if (certificateNode.getNodeName().equals("#text")) {
continue; // Ignore dummy text node ..
}
- if (!certificateNode.getNodeName().equals("certificate")) { //
- log.warn("Ignoring XML node: " + certificateNode.getNodeName()); //
+ if (!certificateNode.getNodeName().equals("certificate")) {
+ log.warn("Ignoring XML node: " + certificateNode.getNodeName());
continue;
}
String certResource = Constants.RES_CERT_PATH + certificateNode.getTextContent();
- X509Certificate cert = (X509Certificate) CertificateFactory.getInstance("X509"). //
+ X509Certificate cert = (X509Certificate) CertificateFactory.getInstance("X509").
generateCertificate(this.getClass().getResourceAsStream(certResource));
myKeyStore.setCertificateEntry(certificateNode.getTextContent(), cert);
- log.debug("Loaded certificate : " + certResource); //
+ log.debug("Loaded certificate : " + certResource);
} catch (Exception ex) {
- log.error("Failed to load certificate [" + "]", ex); // //
+ log.error("Failed to load certificate [" + "]", ex);
}
}
@@ -156,7 +156,7 @@ public class SimpleXMLTrustManager implements X509TrustManager {
* Find some other way to initialize, or else we have to fail the
* constructor.
*/
- throw new Exception("Couldn't initialize ASITTrustManager"); //
+ throw new Exception("Couldn't initialize ASITTrustManager");
}
/*
@@ -174,7 +174,7 @@ public class SimpleXMLTrustManager implements X509TrustManager {
try {
this.sunJSSEX509TrustManager.checkClientTrusted(arg0, arg1);
} catch (CertificateException ex2) {
- log.info("checkClientTrusted: ", ex2); //
+ log.info("checkClientTrusted: ", ex2);
throw ex2;
}
}
@@ -195,7 +195,7 @@ public class SimpleXMLTrustManager implements X509TrustManager {
try {
this.sunJSSEX509TrustManager.checkServerTrusted(arg0, arg1);
} catch (CertificateException ex2) {
- log.info("checkServerTrusted: ", ex2); //
+ log.info("checkServerTrusted: ", ex2);
throw ex2;
}
}