|
Oracle Security Developer Tools XML Security Java API Reference 11g (11.1.1) E10680-02 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface CertificateValidator
Method Summary | |
---|---|
void |
validateCert(java.security.cert.CertPath cp) Validate a certificate path of X509Certificates. |
Method Detail |
---|
void validateCert(java.security.cert.CertPath cp) throws CertificateValidatorException
Here is a sample implementation using the CertPathValidator. A real implementation would probably not create a new CertPathValidator every time but possibly store it in a thread local variable public void validateCert(CertPath cp) { try { // set up a certificate validator CertPathValidator cpv = CertPathValidator.getInstance("PKIX"); // .. configure the trust anchor, CRLs OCSP etc // now try to validate CertPathValidatorResult cpvResult = cpv.validate(cp, params); // if there is no exception, validation succeded } catch (CertificateException ex) { throw new CertificateValidatorException(ex); } catch (NoSuchAlgorithmException ex) { throw new CertificateValidatorException(ex); } }
certList
- List of X509CertificateCertificateValidatorException
- is the certificate chain is invalid
|
Oracle Security Developer Tools XML Security Java API Reference 11g (11.1.1) E10680-02 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |