C# Class Org.BouncyCastle.X509.X509V1CertificateGenerator

Class to Generate X509V1 Certificates.
Afficher le fichier Open project: JamieMellway/iTextSharpLGPL-Monotouch Class Usage Examples

Méthodes publiques

Méthode Description
Generate ( AsymmetricKeyParameter privateKey ) : X509Certificate

Generate a new X509Certificate.

Generate ( AsymmetricKeyParameter privateKey, SecureRandom random ) : X509Certificate

Generate a new X509Certificate specifying a SecureRandom instance that you would like to use.

Reset ( ) : void

Reset the generator.

SetIssuerDN ( Org.BouncyCastle.Asn1.X509.X509Name issuer ) : void

Set the issuer distinguished name. The issuer is the entity whose private key is used to sign the certificate.

SetNotAfter ( System.DateTime date ) : void

Set the date after which this certificate will no longer be valid.

SetNotBefore ( System.DateTime date ) : void

Set the date that this certificate is to be valid from.

SetPublicKey ( AsymmetricKeyParameter publicKey ) : void

Set the public key that this certificate identifies.

SetSerialNumber ( BigInteger serialNumber ) : void

Set the certificate's serial number.

Make serial numbers long, if you have no serial number policy make sure the number is at least 16 bytes of secure random data. You will be surprised how ugly a serial number collision can get.

SetSignatureAlgorithm ( string signatureAlgorithm ) : void

Set the signature algorithm that will be used to sign this certificate. This can be either a name or an OID, names are treated as case insensitive.

SetSubjectDN ( Org.BouncyCastle.Asn1.X509.X509Name subject ) : void

Set the subject distinguished name. The subject describes the entity associated with the public key.

X509V1CertificateGenerator ( ) : System

Default Constructor.

Private Methods

Méthode Description
GenerateJcaObject ( TbsCertificateStructure tbsCert, byte signature ) : X509Certificate

Method Details

Generate() public méthode

Generate a new X509Certificate.
public Generate ( AsymmetricKeyParameter privateKey ) : X509Certificate
privateKey Org.BouncyCastle.Crypto.AsymmetricKeyParameter The private key of the issuer used to sign this certificate.
Résultat X509Certificate

Generate() public méthode

Generate a new X509Certificate specifying a SecureRandom instance that you would like to use.
public Generate ( AsymmetricKeyParameter privateKey, SecureRandom random ) : X509Certificate
privateKey Org.BouncyCastle.Crypto.AsymmetricKeyParameter The private key of the issuer used to sign this certificate.
random Org.BouncyCastle.Security.SecureRandom The Secure Random you want to use.
Résultat X509Certificate

Reset() public méthode

Reset the generator.
public Reset ( ) : void
Résultat void

SetIssuerDN() public méthode

Set the issuer distinguished name. The issuer is the entity whose private key is used to sign the certificate.
public SetIssuerDN ( Org.BouncyCastle.Asn1.X509.X509Name issuer ) : void
issuer Org.BouncyCastle.Asn1.X509.X509Name The issuers DN.
Résultat void

SetNotAfter() public méthode

Set the date after which this certificate will no longer be valid.
public SetNotAfter ( System.DateTime date ) : void
date System.DateTime
Résultat void

SetNotBefore() public méthode

Set the date that this certificate is to be valid from.
public SetNotBefore ( System.DateTime date ) : void
date System.DateTime
Résultat void

SetPublicKey() public méthode

Set the public key that this certificate identifies.
public SetPublicKey ( AsymmetricKeyParameter publicKey ) : void
publicKey Org.BouncyCastle.Crypto.AsymmetricKeyParameter
Résultat void

SetSerialNumber() public méthode

Set the certificate's serial number.
Make serial numbers long, if you have no serial number policy make sure the number is at least 16 bytes of secure random data. You will be surprised how ugly a serial number collision can get.
public SetSerialNumber ( BigInteger serialNumber ) : void
serialNumber Org.BouncyCastle.Math.BigInteger The serial number.
Résultat void

SetSignatureAlgorithm() public méthode

Set the signature algorithm that will be used to sign this certificate. This can be either a name or an OID, names are treated as case insensitive.
public SetSignatureAlgorithm ( string signatureAlgorithm ) : void
signatureAlgorithm string string representation of the algorithm name
Résultat void

SetSubjectDN() public méthode

Set the subject distinguished name. The subject describes the entity associated with the public key.
public SetSubjectDN ( Org.BouncyCastle.Asn1.X509.X509Name subject ) : void
subject Org.BouncyCastle.Asn1.X509.X509Name
Résultat void

X509V1CertificateGenerator() public méthode

Default Constructor.
public X509V1CertificateGenerator ( ) : System
Résultat System