CertPath Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
An immutable sequence of certificates (a certification path).
[Android.Runtime.Register("java/security/cert/CertPath", DoNotGenerateAcw=true)]
public abstract class CertPath : Java.Lang.Object, IDisposable, Java.Interop.IJavaPeerable, Java.IO.ISerializable
[<Android.Runtime.Register("java/security/cert/CertPath", DoNotGenerateAcw=true)>]
type CertPath = class
inherit Object
interface ISerializable
interface IJavaObject
interface IDisposable
interface IJavaPeerable
- Inheritance
- Attributes
- Implements
Remarks
An immutable sequence of certificates (a certification path).
This is an abstract class that defines the methods common to all CertPath
s. Subclasses can handle different kinds of certificates (X.509, PGP, etc.).
All CertPath
objects have a type, a list of Certificate
s, and one or more supported encodings. Because the CertPath
class is immutable, a CertPath
cannot change in any externally visible way after being constructed. This stipulation applies to all public fields and methods of this class and any added or overridden by subclasses.
The type is a String
that identifies the type of Certificate
s in the certification path. For each certificate cert
in a certification path certPath
, cert.getType().equals(certPath.getType())
must be true
.
The list of Certificate
s is an ordered List
of zero or more Certificate
s. This List
and all of the Certificate
s contained in it must be immutable.
Each CertPath
object must support one or more encodings so that the object can be translated into a byte array for storage or transmission to other parties. Preferably, these encodings should be well-documented standards (such as PKCS#7). One of the encodings supported by a CertPath
is considered the default encoding. This encoding is used if no encoding is explicitly requested (for the #getEncoded() getEncoded()
method, for instance).
All CertPath
objects are also Serializable
. CertPath
objects are resolved into an alternate CertPathRep CertPathRep
object during serialization. This allows a CertPath
object to be serialized into an equivalent representation regardless of its underlying implementation.
CertPath
objects can be created with a CertificateFactory
or they can be returned by other classes, such as a CertPathBuilder
.
By convention, X.509 CertPath
s (consisting of X509Certificate
s), are ordered starting with the target certificate and ending with a certificate issued by the trust anchor. That is, the issuer of one certificate is the subject of the following one. The certificate representing the TrustAnchor TrustAnchor
should not be included in the certification path. Unvalidated X.509 CertPath
s may not follow these conventions. PKIX CertPathValidator
s will detect any departure from these conventions that cause the certification path to be invalid and throw a CertPathValidatorException
.
Every implementation of the Java platform is required to support the following standard CertPath
encodings: <ul> <li>PKCS7
</li> <li>PkiPath
</li> </ul> These encodings are described in the CertPath Encodings section of the Java Security Standard Algorithm Names Specification. Consult the release documentation for your implementation to see if any other encodings are supported.
<b>Concurrent Access</b>
All CertPath
objects must be thread-safe. That is, multiple threads may concurrently invoke the methods defined in this class on a single CertPath
object (or more than one) with no ill effects. This is also true for the List
returned by CertPath.getCertificates
.
Requiring CertPath
objects to be immutable and thread-safe allows them to be passed around to various pieces of code without worrying about coordinating access. Providing this thread-safety is generally not difficult, since the CertPath
and List
objects in question are immutable.
Added in 1.4.
Java documentation for java.security.cert.CertPath
.
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
CertPath(IntPtr, JniHandleOwnership) |
A constructor used when creating managed representations of JNI objects; called by the runtime. |
CertPath(String) |
Creates a |
Properties
Certificates |
Returns an immutable List of the |
Class |
Returns the runtime class of this |
Encodings |
Returns an |
Handle |
The handle to the underlying Android instance. (Inherited from Object) |
JniIdentityHashCode | (Inherited from Object) |
JniPeerMembers | |
PeerReference | (Inherited from Object) |
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. |
Type |
Returns the type of |
Methods
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) |
GetEncoded() |
Returns the encoded form of this certification path, using the default encoding. |
GetEncoded(String) |
Returns the encoded form of this certification path, using the specified encoding. |
GetHashCode() |
Returns a hash code value for the object. (Inherited from Object) |
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) |
WriteReplace() |
Replaces the |
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) |