Skip to content

Most visited

Recently visited

navigation
Added in API level 1

CertPathValidatorException

public class CertPathValidatorException
extends GeneralSecurityException

java.lang.Object
   ↳ java.lang.Throwable
     ↳ java.lang.Exception
       ↳ java.security.GeneralSecurityException
         ↳ java.security.cert.CertPathValidatorException


The exception that is thrown when a certification path (or certificate chain) cannot be validated.

A CertPathValidatorException may optionally include the certification path instance that failed the validation and the index of the failed certificate.

Summary

Public constructors

CertPathValidatorException(String msg, Throwable cause, CertPath certPath, int index)

Creates a new CertPathValidatorException with the specified message , cause, certification path and certificate index in the certification path.

CertPathValidatorException(String msg, Throwable cause)

Creates a new CertPathValidatorException with the specified message and cause.

CertPathValidatorException(Throwable cause)

Creates a new CertPathValidatorException with the specified cause.

CertPathValidatorException(String msg)

Creates a new CertPathValidatorException with the specified message.

CertPathValidatorException()

Creates a new CertPathValidatorException.

Public methods

CertPath getCertPath()

Returns the certification path that failed validation.

int getIndex()

Returns the index of the failed certificate in the certification path.

Inherited methods

From class java.lang.Throwable
From class java.lang.Object

Public constructors

CertPathValidatorException

Added in API level 1
CertPathValidatorException (String msg, 
                Throwable cause, 
                CertPath certPath, 
                int index)

Creates a new CertPathValidatorException with the specified message , cause, certification path and certificate index in the certification path.

Parameters
msg String: the detail message for this exception.
cause Throwable: the cause.
certPath CertPath: the certification path that failed the validation.
index int: the index of the failed certificate.
Throws
IllegalArgumentException if certPath is null and index is not -1.
IndexOutOfBoundsException if certPath is not null and index is not referencing an certificate in the certification path.

CertPathValidatorException

Added in API level 1
CertPathValidatorException (String msg, 
                Throwable cause)

Creates a new CertPathValidatorException with the specified message and cause.

Parameters
msg String: the detail message for this exception.
cause Throwable: the cause why the path could not be validated.

CertPathValidatorException

Added in API level 1
CertPathValidatorException (Throwable cause)

Creates a new CertPathValidatorException with the specified cause.

Parameters
cause Throwable: the cause why the path could not be validated.

CertPathValidatorException

Added in API level 1
CertPathValidatorException (String msg)

Creates a new CertPathValidatorException with the specified message.

Parameters
msg String: the detail message for this exception.

CertPathValidatorException

Added in API level 1
CertPathValidatorException ()

Creates a new CertPathValidatorException.

Public methods

getCertPath

Added in API level 1
CertPath getCertPath ()

Returns the certification path that failed validation.

Returns
CertPath the certification path that failed validation, or null if none was specified.

getIndex

Added in API level 1
int getIndex ()

Returns the index of the failed certificate in the certification path.

Returns
int the index of the failed certificate in the certification path, or -1 if none was specified.
This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.