C# Класс Org.BouncyCastle.X509.X509V1CertificateGenerator

Class to Generate X509V1 Certificates.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
GenerateJcaObject ( TbsCertificateStructure tbsCert, byte signature ) : X509Certificate

Описание методов

Generate() публичный Метод

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.
Результат X509Certificate

Generate() публичный Метод

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.
Результат X509Certificate

Reset() публичный Метод

Reset the generator.
public Reset ( ) : void
Результат void

SetIssuerDN() публичный Метод

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.
Результат void

SetNotAfter() публичный Метод

Set the date after which this certificate will no longer be valid.
public SetNotAfter ( System.DateTime date ) : void
date System.DateTime
Результат void

SetNotBefore() публичный Метод

Set the date that this certificate is to be valid from.
public SetNotBefore ( System.DateTime date ) : void
date System.DateTime
Результат void

SetPublicKey() публичный Метод

Set the public key that this certificate identifies.
public SetPublicKey ( AsymmetricKeyParameter publicKey ) : void
publicKey Org.BouncyCastle.Crypto.AsymmetricKeyParameter
Результат void

SetSerialNumber() публичный Метод

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.
Результат void

SetSignatureAlgorithm() публичный Метод

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
Результат void

SetSubjectDN() публичный Метод

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
Результат void

X509V1CertificateGenerator() публичный Метод

Default Constructor.
public X509V1CertificateGenerator ( ) : System
Результат System