diff options
author | Damian Minkov <damencho@jitsi.org> | 2010-04-01 07:26:12 +0000 |
---|---|---|
committer | Damian Minkov <damencho@jitsi.org> | 2010-04-01 07:26:12 +0000 |
commit | b841366922e2e44cd5e48d7878de48af17947047 (patch) | |
tree | 371f4b6fcec1b374f57de6167332c75a16e5997f /test/net/java/sip/communicator/slick/protocol | |
parent | 2a49a5de690b31bed35d4875a6f20bdfe3dfaf47 (diff) | |
download | jitsi-b841366922e2e44cd5e48d7878de48af17947047.zip jitsi-b841366922e2e44cd5e48d7878de48af17947047.tar.gz jitsi-b841366922e2e44cd5e48d7878de48af17947047.tar.bz2 |
Implement Always trust mode for verifying certificates, and enable the mode for tests.
Diffstat (limited to 'test/net/java/sip/communicator/slick/protocol')
-rw-r--r-- | test/net/java/sip/communicator/slick/protocol/jabber/TestAccountInstallation.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/net/java/sip/communicator/slick/protocol/jabber/TestAccountInstallation.java b/test/net/java/sip/communicator/slick/protocol/jabber/TestAccountInstallation.java index c7ce9fb..699c37c 100644 --- a/test/net/java/sip/communicator/slick/protocol/jabber/TestAccountInstallation.java +++ b/test/net/java/sip/communicator/slick/protocol/jabber/TestAccountInstallation.java @@ -10,6 +10,8 @@ import java.util.*; import org.osgi.framework.*; import junit.framework.*; +import net.java.sip.communicator.service.configuration.*; +import net.java.sip.communicator.service.gui.*; import net.java.sip.communicator.service.protocol.*; public class TestAccountInstallation @@ -66,6 +68,16 @@ public class TestAccountInstallation "Failed to find a provider factory service for protocol Jabber", serRefs != null && serRefs.length > 0); + // Enable always trust mode for testing tls jabber connections + ServiceReference confReference + = JabberSlickFixture.bc.getServiceReference( + ConfigurationService.class.getName()); + ConfigurationService configurationService + = (ConfigurationService) JabberSlickFixture.bc.getService(confReference); + configurationService.setProperty( + CertificateVerificationService.ALWAYS_TRUST_MODE_ENABLED_PROP_NAME, + Boolean.TRUE); + //Keep the reference for later usage. ProtocolProviderFactory jabberProviderFactory = (ProtocolProviderFactory) JabberSlickFixture.bc.getService(serRefs[0]); |