C# Class Org.BouncyCastle.X509.X509Certificate

An Object representing an X509 Certificate. Has static methods for loading Certificates encoded in many forms that return X509Certificate Objects.
Inheritance: X509ExtensionBase
Afficher le fichier Open project: nonorganic/dssnet Class Usage Examples

Méthodes publiques

Méthode Description
CheckValidity ( ) : void

Checks if the current date is within certificate's validity period.

CheckValidity ( System.DateTime time ) : void

Checks if the given date is within certificate's validity period.

Equals ( object obj ) : bool
GetBasicConstraints ( ) : int
GetEncoded ( ) : byte[]

Return a Der encoded version of this certificate.

GetExtendedKeyUsage ( ) : IList
GetHashCode ( ) : int
GetIssuerAlternativeNames ( ) : ICollection
GetKeyUsage ( ) : bool[]

Get a key usage guidlines.

GetPublicKey ( ) : AsymmetricKeyParameter

Get the public key of the subject of the certificate.

GetSigAlgParams ( ) : byte[]

Get the signature algorithms parameters. (EG DSA Parameters)

GetSignature ( ) : byte[]

The signature.

GetSubjectAlternativeNames ( ) : ICollection
GetTbsCertificate ( ) : byte[]

Return the Der encoded TbsCertificate data. This is the certificate component less the signature. To Get the whole certificate call the GetEncoded() member.

IsValid ( DateTime time ) : bool

Return true if the nominated time is within the start and end times nominated on the certificate.

ToString ( ) : string
Verify ( AsymmetricKeyParameter key ) : void

Verify the certificate's signature using the nominated public key.

X509Certificate ( X509CertificateStructure c ) : System

Méthodes protégées

Méthode Description
CheckSignature ( AsymmetricKeyParameter publicKey, ISigner signature ) : void
GetAlternativeNames ( string oid ) : ICollection
GetX509Extensions ( ) : X509Extensions
X509Certificate ( ) : System

Private Methods

Méthode Description
IsAlgIDEqual ( AlgorithmIdentifier id1, AlgorithmIdentifier id2 ) : bool

Method Details

CheckSignature() protected méthode

protected CheckSignature ( AsymmetricKeyParameter publicKey, ISigner signature ) : void
publicKey Org.BouncyCastle.Crypto.AsymmetricKeyParameter
signature ISigner
Résultat void

CheckValidity() public méthode

Checks if the current date is within certificate's validity period.
public CheckValidity ( ) : void
Résultat void

CheckValidity() public méthode

Checks if the given date is within certificate's validity period.
if the certificate is expired by given date if the certificate is not yet valid on given date
public CheckValidity ( System.DateTime time ) : void
time System.DateTime
Résultat void

Equals() public méthode

public Equals ( object obj ) : bool
obj object
Résultat bool

GetAlternativeNames() protected méthode

protected GetAlternativeNames ( string oid ) : ICollection
oid string
Résultat ICollection

GetBasicConstraints() public méthode

public GetBasicConstraints ( ) : int
Résultat int

GetEncoded() public méthode

Return a Der encoded version of this certificate.
public GetEncoded ( ) : byte[]
Résultat byte[]

GetExtendedKeyUsage() public méthode

public GetExtendedKeyUsage ( ) : IList
Résultat IList

GetHashCode() public méthode

public GetHashCode ( ) : int
Résultat int

GetIssuerAlternativeNames() public méthode

public GetIssuerAlternativeNames ( ) : ICollection
Résultat ICollection

GetKeyUsage() public méthode

Get a key usage guidlines.
public GetKeyUsage ( ) : bool[]
Résultat bool[]

GetPublicKey() public méthode

Get the public key of the subject of the certificate.
public GetPublicKey ( ) : AsymmetricKeyParameter
Résultat AsymmetricKeyParameter

GetSigAlgParams() public méthode

Get the signature algorithms parameters. (EG DSA Parameters)
public GetSigAlgParams ( ) : byte[]
Résultat byte[]

GetSignature() public méthode

The signature.
public GetSignature ( ) : byte[]
Résultat byte[]

GetSubjectAlternativeNames() public méthode

public GetSubjectAlternativeNames ( ) : ICollection
Résultat ICollection

GetTbsCertificate() public méthode

Return the Der encoded TbsCertificate data. This is the certificate component less the signature. To Get the whole certificate call the GetEncoded() member.
public GetTbsCertificate ( ) : byte[]
Résultat byte[]

GetX509Extensions() protected méthode

protected GetX509Extensions ( ) : X509Extensions
Résultat X509Extensions

IsValid() public méthode

Return true if the nominated time is within the start and end times nominated on the certificate.
public IsValid ( DateTime time ) : bool
time DateTime The time to test validity against.
Résultat bool

ToString() public méthode

public ToString ( ) : string
Résultat string

Verify() public méthode

Verify the certificate's signature using the nominated public key.
If key submitted is not of the above nominated types.
public Verify ( AsymmetricKeyParameter key ) : void
key AsymmetricKeyParameter An appropriate public key parameter object, RsaPublicKeyParameters, DsaPublicKeyParameters or ECDsaPublicKeyParameters
Résultat void

X509Certificate() protected méthode

protected X509Certificate ( ) : System
Résultat System

X509Certificate() public méthode

public X509Certificate ( X509CertificateStructure c ) : System
c X509CertificateStructure
Résultat System