CertPathValidatorSpi
Stay organized with collections
Save and categorize content based on your preferences.
The Service Provider Interface (SPI)
for the CertPathValidator
class. All
CertPathValidator
implementations must include a class (the
SPI class) that extends this class (CertPathValidatorSpi
)
and implements all of its methods. In general, instances of this class
should only be accessed through the CertPathValidator
class.
For details, see the Java Cryptography Architecture.
Concurrent Access
Instances of this class need not be protected against concurrent
access from multiple threads. Threads that need to access a single
CertPathValidatorSpi
instance concurrently should synchronize
amongst themselves and provide the necessary locking before calling the
wrapping CertPathValidator
object.
However, implementations of CertPathValidatorSpi
may still
encounter concurrency issues, since multiple threads each
manipulating a different CertPathValidatorSpi
instance need not
synchronize.
Public Constructor Summary
Inherited Method Summary
From class
java.lang.Object
Object
|
clone()
Creates and returns a copy of this Object .
|
boolean
|
equals( Object obj)
Compares this instance with the specified object and indicates if they
are equal.
|
void
|
finalize()
Invoked when the garbage collector has detected that this instance is no longer reachable.
|
final
Class<?>
|
getClass()
Returns the unique instance of Class that represents this
object's class.
|
int
|
hashCode()
Returns an integer hash code for this object.
|
final
void
|
notify()
Causes a thread which is waiting on this object's monitor (by means of
calling one of the wait() methods) to be woken up.
|
final
void
|
notifyAll()
Causes all threads which are waiting on this object's monitor (by means
of calling one of the wait() methods) to be woken up.
|
String
|
toString()
Returns a string containing a concise, human-readable description of this
object.
|
final
void
|
wait(long timeout, int nanos)
Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the
specified timeout expires.
|
final
void
|
wait(long timeout)
Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the
specified timeout expires.
|
final
void
|
wait()
Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object.
|
Public Constructors
public
CertPathValidatorSpi
()
Public Methods
public
CertPathChecker
engineGetRevocationChecker
()
Returns a CertPathChecker
that this implementation uses to
check the revocation status of certificates. A PKIX implementation
returns objects of type PKIXRevocationChecker
.
The primary purpose of this method is to allow callers to specify
additional input parameters and options specific to revocation checking.
See the class description of CertPathValidator
for an example.
This method was added to version 1.8 of the Java Platform Standard
Edition. In order to maintain backwards compatibility with existing
service providers, this method cannot be abstract and by default throws
an UnsupportedOperationException
.
Returns
- a
CertPathChecker
that this implementation uses to
check the revocation status of certificates
Validates the specified certification path using the specified
algorithm parameter set.
The CertPath
specified must be of a type that is
supported by the validation algorithm, otherwise an
InvalidAlgorithmParameterException
will be thrown. For
example, a CertPathValidator
that implements the PKIX
algorithm validates CertPath
objects of type X.509.
Parameters
certPath |
the CertPath to be validated |
params |
the algorithm parameters |
Returns
- the result of the validation algorithm
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-07-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-07-10 UTC."],[[["\u003cp\u003e\u003ccode\u003eCertPathValidatorSpi\u003c/code\u003e is a Service Provider Interface for \u003ccode\u003eCertPathValidator\u003c/code\u003e that handles certificate path validation.\u003c/p\u003e\n"],["\u003cp\u003eImplementations must extend this class and provide their own logic for validating certificate paths.\u003c/p\u003e\n"],["\u003cp\u003eInstances of this class are not inherently thread-safe, requiring external synchronization if shared among threads.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eengineValidate\u003c/code\u003e method performs the core validation, while \u003ccode\u003eengineGetRevocationChecker\u003c/code\u003e (introduced in Java 1.8) handles revocation status checks.\u003c/p\u003e\n"]]],["`CertPathValidatorSpi` is an SPI class for `CertPathValidator` implementations, accessed through the `CertPathValidator` class. Key actions include: implementing `engineValidate` to validate a `CertPath` against algorithm parameters, and implementing `engineGetRevocationChecker` to return a `CertPathChecker` for certificate revocation checks. Instances are not required to be thread-safe; however multiple threads that are each manipulating a different `CertPathValidatorSpi` do not need to synchronize. The default constructor is provided for all implementations.\n"],null,["# CertPathValidatorSpi\n\npublic abstract class **CertPathValidatorSpi** extends [Object](../../../../reference/java/lang/Object.html) \nThe *Service Provider Interface* (**SPI** )\nfor the [CertPathValidator](../../../../reference/java/security/cert/CertPathValidator.html) class. All\n`CertPathValidator` implementations must include a class (the\nSPI class) that extends this class (`CertPathValidatorSpi`)\nand implements all of its methods. In general, instances of this class\nshould only be accessed through the `CertPathValidator` class.\nFor details, see the Java Cryptography Architecture.\n\n\n**Concurrent Access**\n\n\nInstances of this class need not be protected against concurrent\naccess from multiple threads. Threads that need to access a single\n`CertPathValidatorSpi` instance concurrently should synchronize\namongst themselves and provide the necessary locking before calling the\nwrapping `CertPathValidator` object.\n\n\nHowever, implementations of `CertPathValidatorSpi` may still\nencounter concurrency issues, since multiple threads each\nmanipulating a different `CertPathValidatorSpi` instance need not\nsynchronize. \n\n### Public Constructor Summary\n\n|---|----------------------------------------------------------------------------------------------------------------------------------------------|\n| | [CertPathValidatorSpi](../../../../reference/java/security/cert/CertPathValidatorSpi.html#CertPathValidatorSpi())() The default constructor. |\n\n### Public Method Summary\n\n|-----------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [CertPathChecker](../../../../reference/java/security/cert/CertPathChecker.html) | [engineGetRevocationChecker](../../../../reference/java/security/cert/CertPathValidatorSpi.html#engineGetRevocationChecker())() Returns a `CertPathChecker` that this implementation uses to check the revocation status of certificates. |\n| abstract [CertPathValidatorResult](../../../../reference/java/security/cert/CertPathValidatorResult.html) | [engineValidate](../../../../reference/java/security/cert/CertPathValidatorSpi.html#engineValidate(java.security.cert.CertPath,%20java.security.cert.CertPathParameters))([CertPath](../../../../reference/java/security/cert/CertPath.html) certPath, [CertPathParameters](../../../../reference/java/security/cert/CertPathParameters.html) params) Validates the specified certification path using the specified algorithm parameter set. |\n\n### Inherited Method Summary\n\nFrom class [java.lang.Object](../../../../reference/java/lang/Object.html) \n\n|----------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [Object](../../../../reference/java/lang/Object.html) | [clone](../../../../reference/java/lang/Object.html#clone())() Creates and returns a copy of this `Object`. |\n| boolean | [equals](../../../../reference/java/lang/Object.html#equals(java.lang.Object))([Object](../../../../reference/java/lang/Object.html) obj) Compares this instance with the specified object and indicates if they are equal. |\n| void | [finalize](../../../../reference/java/lang/Object.html#finalize())() Invoked when the garbage collector has detected that this instance is no longer reachable. |\n| final [Class](../../../../reference/java/lang/Class.html)\\\u003c?\\\u003e | [getClass](../../../../reference/java/lang/Object.html#getClass())() Returns the unique instance of [Class](../../../../reference/java/lang/Class.html) that represents this object's class. |\n| int | [hashCode](../../../../reference/java/lang/Object.html#hashCode())() Returns an integer hash code for this object. |\n| final void | [notify](../../../../reference/java/lang/Object.html#notify())() Causes a thread which is waiting on this object's monitor (by means of calling one of the `wait()` methods) to be woken up. |\n| final void | [notifyAll](../../../../reference/java/lang/Object.html#notifyAll())() Causes all threads which are waiting on this object's monitor (by means of calling one of the `wait()` methods) to be woken up. |\n| [String](../../../../reference/java/lang/String.html) | [toString](../../../../reference/java/lang/Object.html#toString())() Returns a string containing a concise, human-readable description of this object. |\n| final void | [wait](../../../../reference/java/lang/Object.html#wait(long,%20int))(long timeout, int nanos) Causes the calling thread to wait until another thread calls the `notify()` or `notifyAll()` method of this object or until the specified timeout expires. |\n| final void | [wait](../../../../reference/java/lang/Object.html#wait(long))(long timeout) Causes the calling thread to wait until another thread calls the `notify()` or `notifyAll()` method of this object or until the specified timeout expires. |\n| final void | [wait](../../../../reference/java/lang/Object.html#wait())() Causes the calling thread to wait until another thread calls the `notify()` or `notifyAll()` method of this object. |\n\nPublic Constructors\n-------------------\n\n#### public\n**CertPathValidatorSpi**\n()\n\nThe default constructor.\n\nPublic Methods\n--------------\n\n#### public [CertPathChecker](../../../../reference/java/security/cert/CertPathChecker.html)\n**engineGetRevocationChecker**\n()\n\nReturns a `CertPathChecker` that this implementation uses to\ncheck the revocation status of certificates. A PKIX implementation\nreturns objects of type `PKIXRevocationChecker`.\n\nThe primary purpose of this method is to allow callers to specify\nadditional input parameters and options specific to revocation checking.\nSee the class description of `CertPathValidator` for an example.\n\nThis method was added to version 1.8 of the Java Platform Standard\nEdition. In order to maintain backwards compatibility with existing\nservice providers, this method cannot be abstract and by default throws\nan `UnsupportedOperationException`. \n\n##### Returns\n\n- a `CertPathChecker` that this implementation uses to check the revocation status of certificates \n\n##### Throws\n\n| [UnsupportedOperationException](../../../../reference/java/lang/UnsupportedOperationException.html) | if this method is not supported |\n|-----------------------------------------------------------------------------------------------------|---------------------------------|\n\n#### public abstract [CertPathValidatorResult](../../../../reference/java/security/cert/CertPathValidatorResult.html)\n**engineValidate**\n([CertPath](../../../../reference/java/security/cert/CertPath.html) certPath, [CertPathParameters](../../../../reference/java/security/cert/CertPathParameters.html) params)\n\nValidates the specified certification path using the specified\nalgorithm parameter set.\n\n\nThe `CertPath` specified must be of a type that is\nsupported by the validation algorithm, otherwise an\n`InvalidAlgorithmParameterException` will be thrown. For\nexample, a `CertPathValidator` that implements the PKIX\nalgorithm validates `CertPath` objects of type X.509. \n\n##### Parameters\n\n| certPath | the `CertPath` to be validated |\n| params | the algorithm parameters |\n|----------|--------------------------------|\n\n##### Returns\n\n- the result of the validation algorithm \n\n##### Throws\n\n| [CertPathValidatorException](../../../../reference/java/security/cert/CertPathValidatorException.html) | if the `CertPath` does not validate |\n| [InvalidAlgorithmParameterException](../../../../reference/java/security/InvalidAlgorithmParameterException.html) | if the specified parameters or the type of the specified `CertPath` are inappropriate for this `CertPathValidator` |\n|-------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------|"]]