[java-identity-provider] branch master updated: OSJ-272: Move HttpClient TLS TrustEngine use to a X509TrustManager impl

Brent Putman putmanb at georgetown.edu
Sun Feb 23 21:46:00 EST 2020


This is an automated email from the git hooks/post-receive script.

putmanb pushed a commit to branch master
in repository java-identity-provider.

View the commit online:
http://git.shibboleth.net/view/?p=java-identity-provider.git;a=commit;h=d039473978a8561fa9f67a209e78ecefaafdbe54

The following commit(s) were added to refs/heads/master by this push:
       new  d039473   OSJ-272: Move HttpClient TLS TrustEngine use to a X509TrustManager impl
d039473 is described below

commit d039473978a8561fa9f67a209e78ecefaafdbe54
Author: Brent Putman <putmanb at georgetown.edu>
AuthorDate: Sun Feb 23 21:34:28 2020 -0500

    OSJ-272: Move HttpClient TLS TrustEngine use to a X509TrustManager impl
    
    The type of concrete exception that bubbles up from CAS
    HttpClientProxyValidator changes slightly on cert
    validation failure. With the new TrustManger approach for HttpClient
    TLS, we now (I think properly) get an SSLException wrapping a
    CertificateException, and this case is handled specifically in the CAS
    component.  So the control data in the test needed to change
    accordingly.
---
 .../idp/attribute/resolver/dc/http/impl/HTTPDataConnectorTest.java  | 2 +-
 .../shibboleth/idp/cas/proxy/impl/HttpClientProxyValidatorTest.java | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/idp-attribute-resolver-impl/src/test/java/net/shibboleth/idp/attribute/resolver/dc/http/impl/HTTPDataConnectorTest.java b/idp-attribute-resolver-impl/src/test/java/net/shibboleth/idp/attribute/resolver/dc/http/impl/HTTPDataConnectorTest.java
index 73e35ee..a0fa4fe 100644
--- a/idp-attribute-resolver-impl/src/test/java/net/shibboleth/idp/attribute/resolver/dc/http/impl/HTTPDataConnectorTest.java
+++ b/idp-attribute-resolver-impl/src/test/java/net/shibboleth/idp/attribute/resolver/dc/http/impl/HTTPDataConnectorTest.java
@@ -116,7 +116,7 @@ public class HTTPDataConnectorTest {
     @Test(expectedExceptions=ResolutionException.class) public void testBadProtocol()
             throws Exception {
         final HttpClientBuilder clientBuilder = new HttpClientBuilder();
-        clientBuilder.setTLSSocketFactory(HTTPMetadataResolverTest.buildTrustEngineSocketFactory());
+        clientBuilder.setTLSSocketFactory(HTTPMetadataResolverTest.buildSocketFactory());
         connector.setHttpClient(clientBuilder.buildClient());
 
         final HttpClientSecurityParameters params = new HttpClientSecurityParameters();
diff --git a/idp-cas-impl/src/test/java/net/shibboleth/idp/cas/proxy/impl/HttpClientProxyValidatorTest.java b/idp-cas-impl/src/test/java/net/shibboleth/idp/cas/proxy/impl/HttpClientProxyValidatorTest.java
index 83f92ed..21d1589 100644
--- a/idp-cas-impl/src/test/java/net/shibboleth/idp/cas/proxy/impl/HttpClientProxyValidatorTest.java
+++ b/idp-cas-impl/src/test/java/net/shibboleth/idp/cas/proxy/impl/HttpClientProxyValidatorTest.java
@@ -22,8 +22,8 @@ import static org.testng.Assert.fail;
 
 import java.io.IOException;
 import java.net.URI;
+import java.security.cert.CertificateException;
 
-import javax.security.auth.login.CredentialException;
 import javax.security.auth.login.FailedLoginException;
 import javax.servlet.ServletException;
 import javax.servlet.http.HttpServletRequest;
@@ -88,7 +88,7 @@ public class HttpClientProxyValidatorTest extends AbstractFlowActionTest {
                         "https://localhost:8443",
                         "src/test/resources/credentials/nobody-2.p12",
                         200,
-                        new CredentialException(),
+                        new CertificateException(),
                 },
 
                 // Untrusted cert signed by commercial CA that appears in default system truststore
@@ -96,7 +96,7 @@ public class HttpClientProxyValidatorTest extends AbstractFlowActionTest {
                         "https://localhost:8443",
                         "src/test/resources/credentials/idp-1371.p12",
                         200,
-                        new CredentialException(),
+                        new CertificateException(),
                 },
         };
     }

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list