summaryrefslogtreecommitdiff
path: root/vdrmanager/src
diff options
context:
space:
mode:
authorbju <bju@maxi.fritz.box>2013-04-14 04:40:11 +0200
committerbju <bju@maxi.fritz.box>2013-04-14 04:40:11 +0200
commit4c63b889b78aba81366129f91741d6512247f807 (patch)
treebbb65198b69cd7d06f6af5797da3a7936c627f34 /vdrmanager/src
parentfb6072b9072132752dab8db5ae76820d8ee384ed (diff)
downloadvdr-manager-4c63b889b78aba81366129f91741d6512247f807.tar.gz
vdr-manager-4c63b889b78aba81366129f91741d6512247f807.tar.bz2
show real cert details on problems
Diffstat (limited to 'vdrmanager/src')
-rw-r--r--vdrmanager/src/de/bjusystems/vdrmanager/gui/CertificateProblemDialog.java9
1 files changed, 4 insertions, 5 deletions
diff --git a/vdrmanager/src/de/bjusystems/vdrmanager/gui/CertificateProblemDialog.java b/vdrmanager/src/de/bjusystems/vdrmanager/gui/CertificateProblemDialog.java
index 1d685b4..3e3d6bf 100644
--- a/vdrmanager/src/de/bjusystems/vdrmanager/gui/CertificateProblemDialog.java
+++ b/vdrmanager/src/de/bjusystems/vdrmanager/gui/CertificateProblemDialog.java
@@ -32,13 +32,12 @@ public class CertificateProblemDialog implements CertificateProblemListener {
final Semaphore semaphore = new Semaphore(0, true);
// certificate properties
- final String host = "myhost.de";
- final String key = "Key";
- final String fingerprint = "Fingerprint";
- final String issuer = "Issuer";
+ final String host = chain[0].getSubjectDN().getName().split(",")[0].replace("CN=", "").trim();
+ final String creationDate = chain[0].getNotBefore().toLocaleString();
+ final String validUntil = chain[0].getNotAfter().toLocaleString();
// message
- final CharSequence message = String.format(activity.getString(R.string.certificate_problem_message_text), host, key, fingerprint, issuer);
+ final CharSequence message = String.format(activity.getString(R.string.certificate_problem_message_text), host, creationDate, validUntil);
// create dialog builder
final AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(activity);