Please note that the contents of this offline web site may be out of date. To access the most recent documentation visit the online version .
Note that links that point to online resources are green in color and will open in a new window.
We would love it if you could give us feedback about this material by filling this form (You have to be online to fill it)
Android APIs
public class

CertPathValidatorException

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

Class Overview

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.
[Expand]
Inherited Methods
From class java.lang.Throwable
From class java.lang.Object

Public Constructors

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

Added in API level 1

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

Parameters
msg the detail message for this exception.
cause the cause.
certPath the certification path that failed the validation.
index 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.

public CertPathValidatorException ( String msg, Throwable cause)

Added in API level 1

Creates a new CertPathValidatorException with the specified message and cause.

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

public CertPathValidatorException ( Throwable cause)

Added in API level 1

Creates a new CertPathValidatorException with the specified cause.

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

public CertPathValidatorException ( String msg)

Added in API level 1

Creates a new CertPathValidatorException with the specified message.

Parameters
msg the detail message for this exception.

public CertPathValidatorException ()

Added in API level 1

Creates a new CertPathValidatorException .

Public Methods

public CertPath getCertPath ()

Added in API level 1

Returns the certification path that failed validation.

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

public int getIndex ()

Added in API level 1

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

Returns
  • the index of the failed certificate in the certification path, or -1 if none was specified.