Class X509V1CertificateGenerator
java.lang.Object
org.gudy.bouncycastle.jce.X509V1CertificateGenerator
class to produce an X.509 Version 1 certificate.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static Hashtableprivate AlgorithmIdentifierprivate Stringprivate DERObjectIdentifierprivate V1TBSCertificateGenerator -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongenerate an X509 certificate, based on the current issuer and subject using the default provider "BC".generateX509Certificate(PrivateKey key, String provider) generate an X509 certificate, based on the current issuer and subject, using the passed in provider for the signing, and the passed in source of randomness (if required).generateX509Certificate(PrivateKey key, String provider, SecureRandom random) generate an X509 certificate, based on the current issuer and subject, using the passed in provider for the signing, and the passed in source of randomness (if required).generateX509Certificate(PrivateKey key, SecureRandom random) generate an X509 certificate, based on the current issuer and subject using the default provider "BC" and the passed in source of randomnessvoidreset()reset the generatorvoidsetIssuerDN(X509Name issuer) Set the issuer distinguished name - the issuer is the entity whose private key is used to sign the certificate.voidsetNotAfter(Date date) voidsetNotBefore(Date date) voidsetPublicKey(PublicKey key) voidsetSerialNumber(BigInteger serialNumber) set the serial number for the certificate.voidsetSignatureAlgorithm(String signatureAlgorithm) voidsetSubjectDN(X509Name subject) Set the subject distinguished name.
-
Field Details
-
tbsGen
-
sigOID
-
sigAlgId
-
signatureAlgorithm
-
algorithms
-
-
Constructor Details
-
X509V1CertificateGenerator
public X509V1CertificateGenerator()
-
-
Method Details
-
reset
public void reset()reset the generator -
setSerialNumber
set the serial number for the certificate. -
setIssuerDN
Set the issuer distinguished name - the issuer is the entity whose private key is used to sign the certificate. -
setNotBefore
-
setNotAfter
-
setSubjectDN
Set the subject distinguished name. The subject describes the entity associated with the public key. -
setPublicKey
-
setSignatureAlgorithm
-
generateX509Certificate
public X509Certificate generateX509Certificate(PrivateKey key) throws SecurityException, SignatureException, InvalidKeyException generate an X509 certificate, based on the current issuer and subject using the default provider "BC". -
generateX509Certificate
public X509Certificate generateX509Certificate(PrivateKey key, SecureRandom random) throws SecurityException, SignatureException, InvalidKeyException generate an X509 certificate, based on the current issuer and subject using the default provider "BC" and the passed in source of randomness -
generateX509Certificate
public X509Certificate generateX509Certificate(PrivateKey key, String provider) throws NoSuchProviderException, SecurityException, SignatureException, InvalidKeyException generate an X509 certificate, based on the current issuer and subject, using the passed in provider for the signing, and the passed in source of randomness (if required). -
generateX509Certificate
public X509Certificate generateX509Certificate(PrivateKey key, String provider, SecureRandom random) throws NoSuchProviderException, SecurityException, SignatureException, InvalidKeyException generate an X509 certificate, based on the current issuer and subject, using the passed in provider for the signing, and the passed in source of randomness (if required).
-