public final class SimpleValidator extends Validator
SimpleValidator objects are immutable once they have been created.
Please DO NOT add methods that can change the state of an instance once
it has been created.
| 限定符和类型 | 字段和说明 |
|---|---|
private static String |
NSCT_CODE_SIGNING_CA |
private static String |
NSCT_SSL_CA |
(专用程序包) static sun.security.util.ObjectIdentifier |
OBJID_NETSCAPE_CERT_TYPE |
(专用程序包) static String |
OID_BASIC_CONSTRAINTS |
(专用程序包) static String |
OID_EKU_ANY_USAGE |
(专用程序包) static String |
OID_EXTENDED_KEY_USAGE |
(专用程序包) static String |
OID_KEY_USAGE |
(专用程序包) static String |
OID_NETSCAPE_CERT_TYPE |
private Collection<X509Certificate> |
trustedCerts
Set of the trusted certificates.
|
private Map<X500Principal,List<X509Certificate>> |
trustedX500Principals
The trusted certificates as:
Map (X500Principal)subject of trusted cert -> List of X509Certificate
The list is used because there may be multiple certificates
with an identical subject DN.
|
CHAIN0, endEntityChecker, TYPE_PKIX, TYPE_SIMPLE, validationDate, VAR_CODE_SIGNING, VAR_GENERIC, VAR_JCE_SIGNING, VAR_PLUGIN_CODE_SIGNING, VAR_TLS_CLIENT, VAR_TLS_SERVER, VAR_TSA_SERVER, variant| 构造器和说明 |
|---|
SimpleValidator(String variant,
Collection<X509Certificate> trustedCerts) |
| 限定符和类型 | 方法和说明 |
|---|---|
private X509Certificate[] |
buildTrustedChain(X509Certificate[] chain)
Build a trusted certificate chain.
|
private int |
checkBasicConstraints(X509Certificate cert,
Set<String> critSet,
int maxPathLen) |
private int |
checkExtensions(X509Certificate cert,
int maxPathLen) |
private void |
checkKeyUsage(X509Certificate cert,
Set<String> critSet) |
private void |
checkNetscapeCertType(X509Certificate cert,
Set<String> critSet) |
(专用程序包) X509Certificate[] |
engineValidate(X509Certificate[] chain,
Collection<X509Certificate> otherCerts,
List<byte[]> responseList,
AlgorithmConstraints constraints,
Object parameter)
Perform simple validation of chain.
|
(专用程序包) static boolean |
getNetscapeCertTypeBit(X509Certificate cert,
String type)
Get the value of the specified bit in the Netscape certificate type
extension.
|
private X509Certificate |
getTrustedCertificate(X509Certificate cert)
Return a trusted certificate that matches the input certificate,
or null if no such certificate can be found.
|
Collection<X509Certificate> |
getTrustedCertificates()
Returns an immutable Collection of the X509Certificates this instance
uses as trust anchors.
|
getInstance, getInstance, getInstance, setValidationDate, validate, validate, validate, validatestatic final sun.security.util.ObjectIdentifier OBJID_NETSCAPE_CERT_TYPE
private final Map<X500Principal,List<X509Certificate>> trustedX500Principals
private final Collection<X509Certificate> trustedCerts
SimpleValidator(String variant, Collection<X509Certificate> trustedCerts)
public Collection<X509Certificate> getTrustedCertificates()
ValidatorgetTrustedCertificates 在类中 ValidatorX509Certificate[] engineValidate(X509Certificate[] chain, Collection<X509Certificate> otherCerts, List<byte[]> responseList, AlgorithmConstraints constraints, Object parameter) throws CertificateException
engineValidate 在类中 ValidatorCertificateExceptionprivate int checkExtensions(X509Certificate cert, int maxPathLen) throws CertificateException
private void checkNetscapeCertType(X509Certificate cert, Set<String> critSet) throws CertificateException
static boolean getNetscapeCertTypeBit(X509Certificate cert, String type)
private int checkBasicConstraints(X509Certificate cert, Set<String> critSet, int maxPathLen) throws CertificateException
private void checkKeyUsage(X509Certificate cert, Set<String> critSet) throws CertificateException
private X509Certificate[] buildTrustedChain(X509Certificate[] chain) throws CertificateException
private X509Certificate getTrustedCertificate(X509Certificate cert)
Copyright © 2023. All rights reserved.