diff options
author | wbauer <wbauer@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4> | 2009-01-21 11:22:03 +0000 |
---|---|---|
committer | wbauer <wbauer@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4> | 2009-01-21 11:22:03 +0000 |
commit | 3d0112fcd64ea80ad698861ce5d16e6de93c0bd5 (patch) | |
tree | 1311cc7a420b73af3fa7b9bd7bae39aa46297457 /bkucommon/src | |
parent | ce977ee25ede5535beaf72bd0555c0984d5741bf (diff) | |
download | mocca-3d0112fcd64ea80ad698861ce5d16e6de93c0bd5.tar.gz mocca-3d0112fcd64ea80ad698861ce5d16e6de93c0bd5.tar.bz2 mocca-3d0112fcd64ea80ad698861ce5d16e6de93c0bd5.zip |
Fixed Bug #371
git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@278 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4
Diffstat (limited to 'bkucommon/src')
-rw-r--r-- | bkucommon/src/main/java/at/gv/egiz/bku/conf/Configurator.java | 8 | ||||
-rw-r--r-- | bkucommon/src/test/java/at/gv/egiz/bku/slcommands/impl/xsect/SignatureTest.java | 14 |
2 files changed, 22 insertions, 0 deletions
diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/conf/Configurator.java b/bkucommon/src/main/java/at/gv/egiz/bku/conf/Configurator.java index 733b47dc..7f180ad0 100644 --- a/bkucommon/src/main/java/at/gv/egiz/bku/conf/Configurator.java +++ b/bkucommon/src/main/java/at/gv/egiz/bku/conf/Configurator.java @@ -43,6 +43,7 @@ import at.gv.egiz.bku.binding.DataUrlConnection; import at.gv.egiz.bku.slcommands.impl.xsect.DataObject;
import at.gv.egiz.bku.slcommands.impl.xsect.STALProvider;
import at.gv.egiz.bku.slexceptions.SLRuntimeException;
+import at.gv.egiz.bku.utils.urldereferencer.URLDereferencer;
public abstract class Configurator {
private Log log = LogFactory.getLog(Configurator.class);
@@ -270,6 +271,7 @@ public abstract class Configurator { sslCtx.init(km, new TrustManager[] { pkixTM }, null);
}
DataUrl.setSSLSocketFactory(sslCtx.getSocketFactory());
+ URLDereferencer.getInstance().setSSLSocketFactory(sslCtx.getSocketFactory());
} catch (Exception e) {
log.error("Cannot configure SSL", e);
}
@@ -283,6 +285,12 @@ public abstract class Configurator { return true;
}
});
+ URLDereferencer.getInstance().setHostnameVerifier(new HostnameVerifier() {
+ @Override
+ public boolean verify(String hostname, SSLSession session) {
+ return true;
+ }
+ });
}
}
diff --git a/bkucommon/src/test/java/at/gv/egiz/bku/slcommands/impl/xsect/SignatureTest.java b/bkucommon/src/test/java/at/gv/egiz/bku/slcommands/impl/xsect/SignatureTest.java index 9e34d9ae..78172dcb 100644 --- a/bkucommon/src/test/java/at/gv/egiz/bku/slcommands/impl/xsect/SignatureTest.java +++ b/bkucommon/src/test/java/at/gv/egiz/bku/slcommands/impl/xsect/SignatureTest.java @@ -33,6 +33,8 @@ import java.security.cert.CertificateException; import java.security.cert.X509Certificate;
import java.util.List;
+import javax.net.ssl.HostnameVerifier; +import javax.net.ssl.SSLSocketFactory; import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.JAXBException;
@@ -191,6 +193,18 @@ public class SignatureTest { }
+ } + + @Override + public void setHostnameVerifier(HostnameVerifier hostnameVerifier) { + // TODO Auto-generated method stub + + } + + @Override + public void setSSLSocketFactory(SSLSocketFactory socketFactory) { + // TODO Auto-generated method stub + }
});
|