Code example for HostnameVerifier

Methods: verify

0
        + "hbV+rgRQqHIJd50216OWQJbU3BvdlPbca779NYO4+UZWTFdBM8BdQqs3H4B5Agvp\n" 
        + "y7HeSff1F7XRAgMBAAGjHzAdMBsGA1UdEQQUMBKCB2Jhci5jb22CB2Jhei5jb20w\n" 
        + "DQYJKoZIhvcNAQEFBQADQQBXpZZPOY2Dy1lGG81JTr8L4or9jpKacD7n51eS8iqI\n" 
        + "oTznPNuXHU5bFN0AAGX2ij47f/EahqTpo5RdS95P4sVm\n" 
        + "-----END CERTIFICATE-----"); 
    assertFalse(verifier.verify("foo.com", session));
    assertTrue(verifier.verify("bar.com", session));
    assertTrue(verifier.verify("baz.com", session));
    assertFalse(verifier.verify("a.foo.com", session));
    assertFalse(verifier.verify("quux.com", session));
  } 
 
  @Test public void subjectAltNameWithWildcard() throws Exception { 
    // $ cat ./cert.cnf 
    // [req] 
    // distinguished_name=distinguished_name 
    // req_extensions=req_extensions 
    // x509_extensions=x509_extensions 
    // [distinguished_name] 
    // [req_extensions] 
    // [x509_extensions]