Skip to Main Content

Java Security

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Certificate has unsupported critical extension exception

843811Nov 3 2006 — edited Nov 6 2006
Hello

I am trying to validate a certificate with the following code, but i always get the exception: "java.security.cert.CertPathValidatorException: Certificate has unsupported critical extension"

Security.addProvider(new BouncyCastleProvider());

CertificateFactory cf = CertificateFactory.getInstance("X.509", "BC");
CertPath cp = cf.generateCertPath( this.CertChain);
PKIXParameters params = new PKIXParameters( this.trustedAnchors );

params.setExplicitPolicyRequired( false );
params.setDate(new Date());

CertPathValidator cpv = CertPathValidator.getInstance("PKIX", "BC");
PKIXCertPathValidatorResult result = null;
result = (PKIXCertPathValidatorResult) cpv.validate( cp, params );

Does any body could help me solving the problem ?

Tks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 4 2006
Added on Nov 3 2006
1 comment
1,313 views