summaryrefslogtreecommitdiff
path: root/vdrmanager/src
diff options
context:
space:
mode:
authorbju <bju@maxi.fritz.box>2014-01-22 02:28:34 +0100
committerbju <bju@maxi.fritz.box>2014-01-22 02:28:34 +0100
commit321bebe669a5aafc2c4ff0e9f59e60de2fa79bac (patch)
treef8b81b463027a60481f8f41939eaa5a18824ce19 /vdrmanager/src
parentbc2c9e64787d4682bd9f3a3340f8b46497f63bb3 (diff)
downloadvdr-manager-321bebe669a5aafc2c4ff0e9f59e60de2fa79bac.tar.gz
vdr-manager-321bebe669a5aafc2c4ff0e9f59e60de2fa79bac.tar.bz2
http://projects.vdr-developer.org/issues/1267:
- some fixes on client side certificate validation - added SSL server side support to the plugin
Diffstat (limited to 'vdrmanager/src')
-rw-r--r--vdrmanager/src/de/bjusystems/vdrmanager/gui/CertificateProblemDialog.java9
-rw-r--r--vdrmanager/src/de/bjusystems/vdrmanager/utils/svdrp/SvdrpClient.java1
2 files changed, 9 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();
diff --git a/vdrmanager/src/de/bjusystems/vdrmanager/utils/svdrp/SvdrpClient.java b/vdrmanager/src/de/bjusystems/vdrmanager/utils/svdrp/SvdrpClient.java
index daf2bea..9171bcb 100644
--- a/vdrmanager/src/de/bjusystems/vdrmanager/utils/svdrp/SvdrpClient.java
+++ b/vdrmanager/src/de/bjusystems/vdrmanager/utils/svdrp/SvdrpClient.java
@@ -301,6 +301,7 @@ public abstract class SvdrpClient<Result> {
protected void disconnect() throws IOException {
informListener(SvdrpEvent.DISCONNECTING);
if (socket != null && socket.isConnected()) {
+ writeLine("quit");
socket.close();
socket = null;
}