Top Description Fields Constructors Methods
org.bouncycastle.est.jcajce

public Class JsseDefaultHostnameAuthorizer

extends Object
implements JsseHostnameAuthorizer
Class Inheritance
All Implemented Interfaces
org.bouncycastle.est.jcajce.JsseHostnameAuthorizer
Imports
java.io.ByteArrayInputStream, .IOException, java.net.InetAddress, java.security.cert.CertificateFactory, .X509Certificate, java.util.Collection, .Iterator, .List, .Set, java.util.logging.Level, .Logger, javax.net.ssl.SSLSession, org.bouncycastle.asn1.x500.AttributeTypeAndValue, .RDN, .X500Name, org.bouncycastle.asn1.x500.style.BCStyle, org.bouncycastle.est.ESTException, org.bouncycastle.util.Strings, org.bouncycastle.util.encoders.Hex

A typical hostname authorizer for verifying a hostname against the available certificates.

Field Summary

Modifier and TypeField and Description
private final Set<String>
private static Logger

Constructor Summary

AccessConstructor and Description
public
JsseDefaultHostnameAuthorizer(Set<String>
a set of suffixes that cannot be wild-carded, e.g. { ".com", ".net", ".org" }
knownSuffixes
)

Base constructor.

Method Summary

Modifier and TypeMethod and Description
public static boolean
isValidNameMatch(String name, String dnsName, Set<String> suffixes)

public boolean
verified(String
name of the host to be verified.
name
,
SSLSession
context object to do the verification under.
context
)

Implements org.bouncycastle.est.jcajce.JsseHostnameAuthorizer.verified.

Verify the passed in host name according to the context object.
public boolean
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

knownSuffixesback to summary
private final Set<String> knownSuffixes
LOGback to summary
private static Logger LOG

Constructor Detail

JsseDefaultHostnameAuthorizerback to summary
public JsseDefaultHostnameAuthorizer(Set<String> knownSuffixes)

Base constructor.

The authorizer attempts to perform matching (including the use of the wildcard) in accordance with RFC 6125.

Known suffixes is a list of public domain suffixes that can't be used as wild cards for example *.com, or c*c.com, as a dns wildcard could match every/most .com domains if a registrar were issue it. If *.com is in the known suffixes list will not be allowed to match.

Parameters
knownSuffixes:Set<String>

a set of suffixes that cannot be wild-carded, e.g. { ".com", ".net", ".org" }

Method Detail

isValidNameMatchback to summary
public static boolean isValidNameMatch(String name, String dnsName, Set<String> suffixes) throws IOException
verifiedback to summary
public boolean verified(String name, SSLSession context) throws IOException

Implements org.bouncycastle.est.jcajce.JsseHostnameAuthorizer.verified.

Doc from org.bouncycastle.est.jcajce.JsseHostnameAuthorizer.verified.

Verify the passed in host name according to the context object.

Parameters
name:String

name of the host to be verified.

context:SSLSession

context object to do the verification under.

Returns:boolean

true if name verified, false otherwise.

verifyback to summary
public boolean verify(String name, X509Certificate cert) throws IOException