diff options
author | Damian Minkov <damencho@jitsi.org> | 2013-05-18 11:49:26 +0300 |
---|---|---|
committer | Damian Minkov <damencho@jitsi.org> | 2013-05-18 12:08:35 +0300 |
commit | e35e4a7974d3949500b7d94625d9a08394fa94d8 (patch) | |
tree | 7a949ba03912bcf6dbadc26492cf52f44ab4db5a /src/net/java/sip/communicator/impl/certificate | |
parent | 76631ca877852bc446283d1b4073ff2615127781 (diff) | |
download | jitsi-e35e4a7974d3949500b7d94625d9a08394fa94d8.zip jitsi-e35e4a7974d3949500b7d94625d9a08394fa94d8.tar.gz jitsi-e35e4a7974d3949500b7d94625d9a08394fa94d8.tar.bz2 |
Creates authenticate windows service that will create the dialog and will show it to user used with different impl on android and desktop.
Expose some common functionality in httputil and reuse it in xcap implementation in sip provider.
Wraps sslSocketFactory to use the constructor that is common for android and desktop httpclient lib.
Creates separate bundle for httpclient libs in order to separate it from httputil bundle which will be used in android.
Diffstat (limited to 'src/net/java/sip/communicator/impl/certificate')
3 files changed, 36 insertions, 9 deletions
diff --git a/src/net/java/sip/communicator/impl/certificate/CertificateServiceImpl.java b/src/net/java/sip/communicator/impl/certificate/CertificateServiceImpl.java index 1a1557c..751d7f4 100644 --- a/src/net/java/sip/communicator/impl/certificate/CertificateServiceImpl.java +++ b/src/net/java/sip/communicator/impl/certificate/CertificateServiceImpl.java @@ -19,9 +19,9 @@ import java.util.*; import javax.net.ssl.*;
import javax.security.auth.callback.*;
-import net.java.sip.communicator.plugin.desktoputil.*;
import net.java.sip.communicator.service.certificate.*;
import net.java.sip.communicator.service.credentialsstorage.*;
+import net.java.sip.communicator.service.gui.*;
import net.java.sip.communicator.service.httputil.*;
import net.java.sip.communicator.util.Logger;
@@ -430,14 +430,29 @@ public class CertificateServiceImpl }
else
{
- AuthenticationWindow aw =
- new AuthenticationWindow(
- f.getName(),
- null,
- kt.getName(),
- false,
- null
- );
+ AuthenticationWindowService
+ authenticationWindowService =
+ CertificateVerificationActivator
+ .getAuthenticationWindowService();
+
+ if(authenticationWindowService == null)
+ {
+ logger.error(
+ "No AuthenticationWindowService " +
+ "implementation");
+ throw new IOException("User cancel");
+ }
+
+ AuthenticationWindowService.AuthenticationWindow
+ aw = authenticationWindowService.create(
+ f.getName(),
+ null,
+ kt.getName(),
+ false,
+ false,
+ null, null, null, null,
+ null, null, null);
+
aw.setAllowSavePassword(false);
aw.setVisible(true);
if (!aw.isCanceled())
diff --git a/src/net/java/sip/communicator/impl/certificate/CertificateVerificationActivator.java b/src/net/java/sip/communicator/impl/certificate/CertificateVerificationActivator.java index eeee7e3..528ec47 100644 --- a/src/net/java/sip/communicator/impl/certificate/CertificateVerificationActivator.java +++ b/src/net/java/sip/communicator/impl/certificate/CertificateVerificationActivator.java @@ -8,6 +8,7 @@ package net.java.sip.communicator.impl.certificate; import net.java.sip.communicator.service.certificate.*; import net.java.sip.communicator.service.credentialsstorage.*; +import net.java.sip.communicator.service.gui.*; import net.java.sip.communicator.util.*; import org.jitsi.service.configuration.*; @@ -154,4 +155,14 @@ public class CertificateVerificationActivator } return certificateDialogService; } + + /** + * Returns service to show authentication window. + * @return return service to show authentication window. + */ + public static AuthenticationWindowService getAuthenticationWindowService() + { + return ServiceUtils.getService( + bundleContext, AuthenticationWindowService.class); + } } diff --git a/src/net/java/sip/communicator/impl/certificate/certificate.manifest.mf b/src/net/java/sip/communicator/impl/certificate/certificate.manifest.mf index 2c55168..981e58a 100644 --- a/src/net/java/sip/communicator/impl/certificate/certificate.manifest.mf +++ b/src/net/java/sip/communicator/impl/certificate/certificate.manifest.mf @@ -6,6 +6,7 @@ Bundle-Version: 0.0.1 System-Bundle: yes Export-Package: net.java.sip.communicator.service.certificate Import-Package: org.osgi.framework, + net.java.sip.communicator.service.gui, net.java.sip.communicator.util, net.java.sip.communicator.plugin.desktoputil, org.jitsi.service.configuration, |