Class AllowAnyHostnameVerifier

  • All Implemented Interfaces:
    javax.net.ssl.HostnameVerifier, CertificateHostnameVerifier

    public class AllowAnyHostnameVerifier
    extends java.lang.Object
    implements javax.net.ssl.HostnameVerifier, CertificateHostnameVerifier
    Hostname verifier that returns true for any hostname. Use with caution.
    Author:
    Middleware Services
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean verify​(java.lang.String hostname, java.security.cert.X509Certificate cert)
      Verify the supplied hostname matches the supplied certificate.
      boolean verify​(java.lang.String hostname, javax.net.ssl.SSLSession session)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AllowAnyHostnameVerifier

        public AllowAnyHostnameVerifier()
    • Method Detail

      • verify

        public boolean verify​(java.lang.String hostname,
                              javax.net.ssl.SSLSession session)
        Specified by:
        verify in interface javax.net.ssl.HostnameVerifier
      • verify

        public boolean verify​(java.lang.String hostname,
                              java.security.cert.X509Certificate cert)
        Description copied from interface: CertificateHostnameVerifier
        Verify the supplied hostname matches the supplied certificate.
        Specified by:
        verify in interface CertificateHostnameVerifier
        Parameters:
        hostname - to verify
        cert - to verify hostname against
        Returns:
        whether hostname is valid for the supplied certificate