CertPathBuilder Class

Definition

A class for building certification paths (also known as certificate chains).

[Android.Runtime.Register("java/security/cert/CertPathBuilder", DoNotGenerateAcw=true)]
public class CertPathBuilder : Java.Lang.Object
[<Android.Runtime.Register("java/security/cert/CertPathBuilder", DoNotGenerateAcw=true)>]
type CertPathBuilder = class
    inherit Object
Inheritance
CertPathBuilder
Attributes

Remarks

A class for building certification paths (also known as certificate chains).

This class uses a provider-based architecture. To create a CertPathBuilder, call one of the static getInstance methods, passing in the algorithm name of the CertPathBuilder desired and optionally the name of the provider desired.

Once a CertPathBuilder object has been created, certification paths can be constructed by calling the #build build method and passing it an algorithm-specific set of parameters. If successful, the result (including the CertPath that was built) is returned in an object that implements the CertPathBuilderResult interface.

The #getRevocationChecker method allows an application to specify additional algorithm-specific parameters and options used by the CertPathBuilder when checking the revocation status of certificates. Here is an example demonstrating how it is used with the PKIX algorithm:

CertPathBuilder cpb = CertPathBuilder.getInstance("PKIX");
            PKIXRevocationChecker rc = (PKIXRevocationChecker)cpb.getRevocationChecker();
            rc.setOptions(EnumSet.of(Option.PREFER_CRLS));
            params.addCertPathChecker(rc);
            CertPathBuilderResult cpbr = cpb.build(params);

Every implementation of the Java platform is required to support the following standard CertPathBuilder algorithm: <ul> <li>PKIX</li> </ul> This algorithm is described in the CertPathBuilder section of the Java Security Standard Algorithm Names Specification. Consult the release documentation for your implementation to see if any other algorithms are supported.

<b>Concurrent Access</b>

The static methods of this class are guaranteed to be thread-safe. Multiple threads may concurrently invoke the static methods defined in this class with no ill effects.

However, this is not true for the non-static methods defined by this class. Unless otherwise documented by a specific provider, threads that need to access a single CertPathBuilder instance concurrently should synchronize amongst themselves and provide the necessary locking. Multiple threads each manipulating a different CertPathBuilder instance need not synchronize.

Added in 1.4.

Java documentation for java.security.cert.CertPathBuilder.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Constructors

CertPathBuilder(CertPathBuilderSpi, Provider, String)

Creates a CertPathBuilder object of the given algorithm, and encapsulates the given provider implementation (SPI object) in it.

CertPathBuilder(IntPtr, JniHandleOwnership)

A constructor used when creating managed representations of JNI objects; called by the runtime.

Properties

Algorithm

Returns the name of the algorithm of this CertPathBuilder.

Class

Returns the runtime class of this Object.

(Inherited from Object)
DefaultType

Returns the default CertPathBuilder type as specified by the certpathbuilder.type security property, or the string "PKIX" if no such property exists.

Handle

The handle to the underlying Android instance.

(Inherited from Object)
JniIdentityHashCode (Inherited from Object)
JniPeerMembers
PeerReference (Inherited from Object)
Provider

Returns the provider of this CertPathBuilder.

RevocationChecker

Returns a CertPathChecker that the encapsulated CertPathBuilderSpi implementation uses to check the revocation status of certificates.

ThresholdClass

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

ThresholdType

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

Methods

Build(ICertPathParameters)

Attempts to build a certification path using the specified algorithm parameter set.

Clone()

Creates and returns a copy of this object.

(Inherited from Object)
Dispose() (Inherited from Object)
Dispose(Boolean) (Inherited from Object)
Equals(Object)

Indicates whether some other object is "equal to" this one.

(Inherited from Object)
GetHashCode()

Returns a hash code value for the object.

(Inherited from Object)
GetInstance(String)

Returns a CertPathBuilder object that implements the specified algorithm.

GetInstance(String, Provider)

Returns a CertPathBuilder object that implements the specified algorithm.

GetInstance(String, String)

Returns a CertPathBuilder object that implements the specified algorithm.

JavaFinalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

(Inherited from Object)
Notify()

Wakes up a single thread that is waiting on this object's monitor.

(Inherited from Object)
NotifyAll()

Wakes up all threads that are waiting on this object's monitor.

(Inherited from Object)
SetHandle(IntPtr, JniHandleOwnership)

Sets the Handle property.

(Inherited from Object)
ToArray<T>() (Inherited from Object)
ToString()

Returns a string representation of the object.

(Inherited from Object)
UnregisterFromRuntime() (Inherited from Object)
Wait()

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>.

(Inherited from Object)
Wait(Int64)

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed.

(Inherited from Object)
Wait(Int64, Int32)

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed.

(Inherited from Object)

Explicit Interface Implementations

IJavaPeerable.Disposed() (Inherited from Object)
IJavaPeerable.DisposeUnlessReferenced() (Inherited from Object)
IJavaPeerable.Finalized() (Inherited from Object)
IJavaPeerable.JniManagedPeerState (Inherited from Object)
IJavaPeerable.SetJniIdentityHashCode(Int32) (Inherited from Object)
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) (Inherited from Object)
IJavaPeerable.SetPeerReference(JniObjectReference) (Inherited from Object)

Extension Methods

JavaCast<TResult>(IJavaObject)

Performs an Android runtime-checked type conversion.

JavaCast<TResult>(IJavaObject)
GetJniTypeName(IJavaPeerable)

Applies to