C# Class Org.Mentalis.Security.Certificates.CertificateChain

Defines a chain of certificates.
Mostrar archivo Open project: ElanHasson/SSIS-Extensions Class Usage Examples

Public Methods

Method Description
BeginVerifyChain ( string server, AuthType type, VerificationFlags flags, AsyncCallback callback, object asyncState ) : IAsyncResult

Begins verification of the end Certificate according to the SSL policy rules.

CertificateChain ( Org.Mentalis.Security.Certificates.Certificate cert ) : System

Initializes a new CertificateChain instance from a Certificate.

cert will always be the end certificate.

CertificateChain ( Org.Mentalis.Security.Certificates.Certificate cert, Org.Mentalis.Security.Certificates.CertificateStore additional ) : System

Initializes a new CertificateChain instance from a Certificate.

cert will always be the end certificate.

CertificateChain ( Org.Mentalis.Security.Certificates.Certificate cert, Org.Mentalis.Security.Certificates.CertificateStore additional, CertificateChainOptions options ) : System

Initializes a new CertificateChain instance from a Certificate.

cert will always be the end certificate.

EndVerifyChain ( IAsyncResult ar ) : CertificateStatus

Ends a pending asynchronous certificate verification request.

GetCertificates ( ) : Org.Mentalis.Security.Certificates.Certificate[]

Returns the list of certificates in this CertificateChain.

The certificate with index 0 is the end certificate in the chain, the certificate with the highest index is the root certificate [if it can be found].

VerifyChain ( string server, AuthType type ) : CertificateStatus

Verifies the end Certificate according to the SSL policy rules.

VerifyChain ( string server, AuthType type, VerificationFlags flags ) : CertificateStatus

Verifies the end Certificate according to the SSL policy rules.

VerifyChain ( string server, AuthType type, VerificationFlags flags, byte crl ) : CertificateStatus

Verifies the end Certificate according to the SSL policy rules.

Only the leaf certificate is checked against the CRL.

Protected Methods

Method Description
StartVerification ( object state ) : void

Verifies a certificate chain and calls a delegate when finished.

Method Details

BeginVerifyChain() public method

Begins verification of the end Certificate according to the SSL policy rules.
An error occurs while queuing the verification request.
public BeginVerifyChain ( string server, AuthType type, VerificationFlags flags, AsyncCallback callback, object asyncState ) : IAsyncResult
server string The server that returned the certificate -or- a null reference if the certificate is a client certificate.
type AuthType One of the values.
flags VerificationFlags One or more of the values. VerificationFlags values can be combined with the OR operator.
callback AsyncCallback The delegate.
asyncState object An object that contains state information for this request.
return IAsyncResult

CertificateChain() public method

Initializes a new CertificateChain instance from a Certificate.
cert will always be the end certificate.
is a null reference (Nothing in Visual Basic). An error occurs while building the certificate chain.
public CertificateChain ( Org.Mentalis.Security.Certificates.Certificate cert ) : System
cert Org.Mentalis.Security.Certificates.Certificate The certificate for which a chain is being built.
return System

CertificateChain() public method

Initializes a new CertificateChain instance from a Certificate.
cert will always be the end certificate.
is a null reference (Nothing in Visual Basic). An error occurs while building the certificate chain.
public CertificateChain ( Org.Mentalis.Security.Certificates.Certificate cert, Org.Mentalis.Security.Certificates.CertificateStore additional ) : System
cert Org.Mentalis.Security.Certificates.Certificate The certificate for which a chain is being built.
additional Org.Mentalis.Security.Certificates.CertificateStore Any additional store to be searched for supporting certificates and CTLs.
return System

CertificateChain() public method

Initializes a new CertificateChain instance from a Certificate.
cert will always be the end certificate.
is a null reference (Nothing in Visual Basic). An error occurs while building the certificate chain.
public CertificateChain ( Org.Mentalis.Security.Certificates.Certificate cert, Org.Mentalis.Security.Certificates.CertificateStore additional, CertificateChainOptions options ) : System
cert Org.Mentalis.Security.Certificates.Certificate The certificate for which a chain is being built.
additional Org.Mentalis.Security.Certificates.CertificateStore Any additional store to be searched for supporting certificates and CTLs.
options CertificateChainOptions Additional certificate chain options.
return System

EndVerifyChain() public method

Ends a pending asynchronous certificate verification request.
is a null reference (Nothing in Visual Basic). The parameter was not returned by a call to the method. EndVerifyChain was previously called for the asynchronous chain verification. An error occurs while verifying the certificate chain.
public EndVerifyChain ( IAsyncResult ar ) : CertificateStatus
ar IAsyncResult Stores state information for this asynchronous operation as well as any user-defined data.
return CertificateStatus

GetCertificates() public method

Returns the list of certificates in this CertificateChain.
The certificate with index 0 is the end certificate in the chain, the certificate with the highest index is the root certificate [if it can be found].
public GetCertificates ( ) : Org.Mentalis.Security.Certificates.Certificate[]
return Org.Mentalis.Security.Certificates.Certificate[]

StartVerification() protected method

Verifies a certificate chain and calls a delegate when finished.
protected StartVerification ( object state ) : void
state object Stores state information for this asynchronous operation as well as any user-defined data.
return void

VerifyChain() public method

Verifies the end Certificate according to the SSL policy rules.
An error occurs while verifying the certificate.
public VerifyChain ( string server, AuthType type ) : CertificateStatus
server string The server that returned the certificate -or- a null reference if the certificate is a client certificate.
type AuthType One of the values.
return CertificateStatus

VerifyChain() public method

Verifies the end Certificate according to the SSL policy rules.
An error occurs while verifying the certificate.
public VerifyChain ( string server, AuthType type, VerificationFlags flags ) : CertificateStatus
server string The server that returned the certificate -or- a null reference if the certificate is a client certificate.
type AuthType One of the values.
flags VerificationFlags One or more of the values. VerificationFlags values can be combined with the OR operator.
return CertificateStatus

VerifyChain() public method

Verifies the end Certificate according to the SSL policy rules.
Only the leaf certificate is checked against the CRL.
An error occurs while verifying the certificate.
public VerifyChain ( string server, AuthType type, VerificationFlags flags, byte crl ) : CertificateStatus
server string The server that returned the certificate -or- a null reference if the certificate is a client certificate.
type AuthType One of the values.
flags VerificationFlags One or more of the values. VerificationFlags values can be combined with the OR operator.
crl byte An optional CRL to check. This parameter can be null (Nothing in Visual Basic).
return CertificateStatus