diff options
Diffstat (limited to 'vdrmanager')
-rw-r--r-- | vdrmanager/res/values/strings.xml | 11 | ||||
-rw-r--r-- | vdrmanager/src/de/bjusystems/vdrmanager/gui/CertificateProblemDialog.java | 9 |
2 files changed, 11 insertions, 9 deletions
diff --git a/vdrmanager/res/values/strings.xml b/vdrmanager/res/values/strings.xml index dd12a14..da1fd23 100644 --- a/vdrmanager/res/values/strings.xml +++ b/vdrmanager/res/values/strings.xml @@ -400,10 +400,13 @@ <string name="certificate_problem_message_title">Certificate warning</string> <string name="certificate_problem_message_text" formatted="false"> - The server certificate was not accepted:\n - Hostname: %s\n - Fingerprint: %s\n - Issuer: %s +The server certificate was not accepted:\n +Hostname:\n + %s\n +Created:\n + %s\n +Valid until:\n + %s </string> <string name="certificate_accept_once">Continue</string> <string name="certificate_accepted_forever">Remember certificate</string> 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); |