summaryrefslogtreecommitdiff
path: root/vdrmanager/src/de/bjusystems/vdrmanager/gui/CertificateProblemDialog.java
diff options
context:
space:
mode:
Diffstat (limited to 'vdrmanager/src/de/bjusystems/vdrmanager/gui/CertificateProblemDialog.java')
-rw-r--r--vdrmanager/src/de/bjusystems/vdrmanager/gui/CertificateProblemDialog.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/vdrmanager/src/de/bjusystems/vdrmanager/gui/CertificateProblemDialog.java b/vdrmanager/src/de/bjusystems/vdrmanager/gui/CertificateProblemDialog.java
index bf7034f..b0c58df 100644
--- a/vdrmanager/src/de/bjusystems/vdrmanager/gui/CertificateProblemDialog.java
+++ b/vdrmanager/src/de/bjusystems/vdrmanager/gui/CertificateProblemDialog.java
@@ -32,7 +32,14 @@ public class CertificateProblemDialog implements CertificateProblemListener {
final Semaphore semaphore = new Semaphore(0, true);
// certificate properties
- final String host = chain[0].getSubjectDN().getName().split(",")[0].replace("CN=", "").trim();
+ final String[] values = chain[0].getSubjectDN().getName().split(",");
+ String host = "???";
+ for(String value : values) {
+ if (value.contains("CN=")) {
+ host = value.replace("CN=", "").trim();
+ break;
+ }
+ }
final String creationDate = chain[0].getNotBefore().toLocaleString();
final String validUntil = chain[0].getNotAfter().toLocaleString();