Repository: incubator-slider Updated Branches: refs/heads/develop 9130f0eac -> 7b560b910
SLIDER-1111 fix SSL test issues with newer JDKs Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/7b560b91 Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/7b560b91 Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/7b560b91 Branch: refs/heads/develop Commit: 7b560b910f5754a4c0fb2918972b7af41a20b7fd Parents: 9130f0e Author: Billie Rinaldi <billie.rina...@gmail.com> Authored: Mon Apr 18 11:47:23 2016 -0700 Committer: Billie Rinaldi <billie.rina...@gmail.com> Committed: Mon Apr 18 11:47:23 2016 -0700 ---------------------------------------------------------------------- .../funtest/accumulo/AccumuloSSLTestBase.groovy | 31 ++++++++++++++++---- .../server/services/security/SecurityUtils.java | 2 +- 2 files changed, 26 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/7b560b91/app-packages/accumulo/src/test/groovy/org/apache/slider/funtest/accumulo/AccumuloSSLTestBase.groovy ---------------------------------------------------------------------- diff --git a/app-packages/accumulo/src/test/groovy/org/apache/slider/funtest/accumulo/AccumuloSSLTestBase.groovy b/app-packages/accumulo/src/test/groovy/org/apache/slider/funtest/accumulo/AccumuloSSLTestBase.groovy index 240aad1..95eb0fb 100644 --- a/app-packages/accumulo/src/test/groovy/org/apache/slider/funtest/accumulo/AccumuloSSLTestBase.groovy +++ b/app-packages/accumulo/src/test/groovy/org/apache/slider/funtest/accumulo/AccumuloSSLTestBase.groovy @@ -21,8 +21,9 @@ import org.junit.BeforeClass import javax.net.ssl.KeyManager import javax.net.ssl.SSLContext +import javax.net.ssl.SSLEngine import javax.net.ssl.TrustManager -import javax.net.ssl.X509TrustManager +import javax.net.ssl.X509ExtendedTrustManager import java.security.SecureRandom import java.security.cert.CertificateException import java.security.cert.X509Certificate @@ -56,16 +57,34 @@ class AccumuloSSLTestBase extends AccumuloBasicIT { SSLContext.setDefault(ctx); } - private static class DefaultTrustManager implements X509TrustManager { + private static class DefaultTrustManager extends X509ExtendedTrustManager { @Override - public void checkClientTrusted(X509Certificate[] arg0, String arg1) throws CertificateException {} + void checkClientTrusted(X509Certificate[] x509Certificates, String s, Socket socket) throws CertificateException { + } + + @Override + void checkServerTrusted(X509Certificate[] x509Certificates, String s, Socket socket) throws CertificateException { + } + + @Override + void checkClientTrusted(X509Certificate[] x509Certificates, String s, SSLEngine sslEngine) throws CertificateException { + } @Override - public void checkServerTrusted(X509Certificate[] arg0, String arg1) throws CertificateException {} + void checkServerTrusted(X509Certificate[] x509Certificates, String s, SSLEngine sslEngine) throws CertificateException { + } + + @Override + void checkClientTrusted(X509Certificate[] x509Certificates, String s) throws CertificateException { + } + + @Override + void checkServerTrusted(X509Certificate[] x509Certificates, String s) throws CertificateException { + } @Override - public X509Certificate[] getAcceptedIssuers() { - return null; + X509Certificate[] getAcceptedIssuers() { + return new X509Certificate[0] } } } http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/7b560b91/slider-core/src/main/java/org/apache/slider/server/services/security/SecurityUtils.java ---------------------------------------------------------------------- diff --git a/slider-core/src/main/java/org/apache/slider/server/services/security/SecurityUtils.java b/slider-core/src/main/java/org/apache/slider/server/services/security/SecurityUtils.java index 4b2c557..9beb2d8 100644 --- a/slider-core/src/main/java/org/apache/slider/server/services/security/SecurityUtils.java +++ b/slider-core/src/main/java/org/apache/slider/server/services/security/SecurityUtils.java @@ -58,7 +58,7 @@ public class SecurityUtils { + "default_days = 365 \n" + "\n" + "default_crl_days = 7 \n" - + "default_md = md5 \n" + + "default_md = sha256 \n" + "\n" + "policy = policy_anything \n" + "\n"