aboutsummaryrefslogtreecommitdiffstats
path: root/src/net/java/sip/communicator/service/certificate
diff options
context:
space:
mode:
authorDamian Minkov <damencho@jitsi.org>2013-05-16 10:35:06 +0300
committerDamian Minkov <damencho@jitsi.org>2013-05-16 10:40:38 +0300
commit311d7512c909466e9c662481a5af7198717d8a8c (patch)
tree5a21a9a2b03fdf33ba4eb5f287e489dee2720d4a /src/net/java/sip/communicator/service/certificate
parentf222bd9bb54a9edfa5a00b2152e62d92479d3f73 (diff)
downloadjitsi-311d7512c909466e9c662481a5af7198717d8a8c.zip
jitsi-311d7512c909466e9c662481a5af7198717d8a8c.tar.gz
jitsi-311d7512c909466e9c662481a5af7198717d8a8c.tar.bz2
Moves verify certificate dialog in separate service in order to use the certificate service in android.
Diffstat (limited to 'src/net/java/sip/communicator/service/certificate')
-rw-r--r--src/net/java/sip/communicator/service/certificate/VerifyCertificateDialogService.java55
1 files changed, 55 insertions, 0 deletions
diff --git a/src/net/java/sip/communicator/service/certificate/VerifyCertificateDialogService.java b/src/net/java/sip/communicator/service/certificate/VerifyCertificateDialogService.java
new file mode 100644
index 0000000..7cb3e43
--- /dev/null
+++ b/src/net/java/sip/communicator/service/certificate/VerifyCertificateDialogService.java
@@ -0,0 +1,55 @@
+/*
+ * Jitsi, the OpenSource Java VoIP and Instant Messaging client.
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package net.java.sip.communicator.service.certificate;
+
+import java.security.cert.*;
+
+/**
+ * Service that creates dialog that is shown to the user when
+ * a certificate verification failed.
+ *
+ * @author Damian Minkov
+ */
+public interface VerifyCertificateDialogService
+{
+ /**
+ * Creates the dialog.
+ *
+ * @param certs the certificates list
+ * @param title The title of the dialog; when null the resource
+ * <tt>service.gui.CERT_DIALOG_TITLE</tt> is loaded and used.
+ * @param message A text that describes why the verification failed.
+ */
+ public VerifyCertificateDialog createDialog(
+ Certificate[] certs, String title, String message);
+
+ /**
+ * The dialog implementers should return <tt>VerifyCertificateDialog</tt>.
+ */
+ public interface VerifyCertificateDialog
+ {
+ /**
+ * Shows or hides the dialog and waits for user response.
+ * @param isVisible whether we should show or hide the dialog.
+ */
+ public void setVisible(boolean isVisible);
+
+ /**
+ * Whether the user has accepted the certificate or not.
+ * @return whether the user has accepted the certificate or not.
+ */
+ public boolean isTrusted();
+
+ /**
+ * Whether the user has selected to note the certificate so we always
+ * trust it.
+ * @return whether the user has selected to note the certificate so
+ * we always trust it.
+ */
+ public boolean isAlwaysTrustSelected();
+ }
+}