[java-openws COMMIT] /branches/REL_1/src/main/java/org/opensaml/ws/soap/client/http/TLSProtocolSocketFactory.java
noreply at shibboleth.net
noreply at shibboleth.net
Thu Jun 18 19:41:01 EDT 2015
Author: putmanb
Date: Thu Jun 18 19:41:01 2015
New Revision: 479
URL: http://svn.shibboleth.net/view/java-openws?rev=479&view=rev
Log:
JOWS-44: Clean up use of JSSE API in TLSProtocolSocketFactory.
Modified:
branches/REL_1/src/main/java/org/opensaml/ws/soap/client/http/TLSProtocolSocketFactory.java
Modified: branches/REL_1/src/main/java/org/opensaml/ws/soap/client/http/TLSProtocolSocketFactory.java
URL: http://svn.shibboleth.net/view/java-openws/branches/REL_1/src/main/java/org/opensaml/ws/soap/client/http/TLSProtocolSocketFactory.java?rev=479&r1=478&r2=479&view=diff
==============================================================================
--- branches/REL_1/src/main/java/org/opensaml/ws/soap/client/http/TLSProtocolSocketFactory.java (original)
+++ branches/REL_1/src/main/java/org/opensaml/ws/soap/client/http/TLSProtocolSocketFactory.java Thu Jun 18 19:41:01 2015
@@ -227,7 +227,15 @@
try {
SSLSession sslSession = sslSocket.getSession();
+ if (!sslSession.isValid()) {
+ throw new SSLException("SSLSession was invalid: Likely implicit handshake failure: "
+ + "Set system property javax.net.debug=all for details");
+ }
+
String hostname = sslSession.getPeerHost();
+ if (hostname == null) {
+ throw new SSLException("SSLSession peerHost was null, skipping hostname verification and terminating");
+ }
if (!hostnameVerifier.verify(hostname, sslSession)) {
throw new SSLPeerUnverifiedException("SSL peer failed hostname validation for name: " + hostname);
More information about the commits
mailing list