Package javax.net.ssl

Examples of javax.net.ssl.HostnameVerifier.verify()


         * TODO: the spec requires to verify server's hostname by default
         * hostname verifier first, if failed, use the callback verifier. RI use
         * callback verifier first then the dafault one. We follow the spec
         * here.
         */
        if (defaultVerifier.verify(sslSocket.getInetAddress().getHostName(),
                sslSocket.getSession())) {
            this.negotiatedSslSocket = sslSocket;
            return sslSocket.getSession();
        } else if (verifier != null
                && verifier.verify(sslSocket.getInetAddress().getHostName(),
View Full Code Here


                    throw new IOException("No SSLSession detected");
                }
            }
            HostnameVerifier verifier = org.apache.cxf.transport.https.SSLUtils
                .getHostnameVerifier(tlsClientParameters);
            if (!verifier.verify(url.getHost(), session)) {
                throw new IOException("Could not verify host " + url.getHost());
            }
           
            String method = (String)outMessage.get(Message.HTTP_REQUEST_METHOD);
            String cipherSuite = null;
View Full Code Here

            connect(true);
          
            HostnameVerifier verifier = org.apache.cxf.transport.https.SSLUtils
                .getHostnameVerifier(findTLSClientParameters());
           
            if (!verifier.verify(url.getHost(), session)) {
                throw new IOException("Could not verify host " + url.getHost());
            }
           
            String method = (String)outMessage.get(Message.HTTP_REQUEST_METHOD);
            String cipherSuite = null;
View Full Code Here

            SSLParameters sslParameters = sslSocket.getSSLParameters();
            sslParameters.setEndpointIdentificationAlgorithm("HTTPS");
            sslSocket.setSSLParameters(sslParameters);
        } else {
            sslSocket.startHandshake();
            if (!verifier.verify(getXmppSession().getDomain(), sslSocket.getSession())) {
                throw new CertificateException("Server failed to authenticate as " + getXmppSession().getDomain());
            }
        }
        outputStream = new BufferedOutputStream(socket.getOutputStream());
        inputStream = new BufferedInputStream(socket.getInputStream());
View Full Code Here

                        SSLEngine engine = sslHandler.engine();
                        SSLSession session = engine.getSession();

                        LOGGER.debug("onFutureSuccess: session = {}, id = {}, isValid = {}, host = {}", session.toString(),
                                Base64.encode(session.getId()), session.isValid(), host);
                        if (hostnameVerifier.verify(host, session)) {
                            final AsyncHandler<T> asyncHandler = future.getAsyncHandler();
                            if (asyncHandler instanceof AsyncHandlerExtensions)
                                AsyncHandlerExtensions.class.cast(asyncHandler).onSslHandshakeCompleted();

                            writeRequest(channel);
View Full Code Here

            } else if (tlsClientParameters.isDisableCNCheck()) {
                verifier = CertificateHostnameVerifier.ALLOW_ALL;
            } else {
                verifier = CertificateHostnameVerifier.DEFAULT;
            }
            if (!verifier.verify(url.getHost(), session)) {
                throw new IOException("Could not verify host " + url.getHost());
            }
           
            String method = (String)outMessage.get(Message.HTTP_REQUEST_METHOD);
            String cipherSuite = null;
View Full Code Here

            } else if (tlsClientParameters.isDisableCNCheck()) {
                verifier = CertificateHostnameVerifier.ALLOW_ALL;
            } else {
                verifier = CertificateHostnameVerifier.DEFAULT;
            }
            if (!verifier.verify(url.getHost(), session)) {
                throw new IOException("Could not verify host " + url.getHost());
            }
           
            String method = (String)outMessage.get(Message.HTTP_REQUEST_METHOD);
            String cipherSuite = null;
View Full Code Here

                    throw new IOException("No SSLSession detected");
                }
            }
            HostnameVerifier verifier = org.apache.cxf.transport.https.SSLUtils
                .getHostnameVerifier(tlsClientParameters);
            if (!verifier.verify(url.getHost(), session)) {
                throw new IOException("Could not verify host " + url.getHost());
            }
           
            String method = (String)outMessage.get(Message.HTTP_REQUEST_METHOD);
            String cipherSuite = null;
View Full Code Here

            connect(true);
          
            HostnameVerifier verifier = org.apache.cxf.transport.https.SSLUtils
                .getHostnameVerifier(findTLSClientParameters());
           
            if (!verifier.verify(url.getHost(), session)) {
                throw new IOException("Could not verify host " + url.getHost());
            }
           
            String method = (String)outMessage.get(Message.HTTP_REQUEST_METHOD);
            String cipherSuite = null;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.