Package org.gudy.bouncycastle.jce
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 Hashtable
private AlgorithmIdentifier
private String
private DERObjectIdentifier
private 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 randomnessvoid
reset()
reset the generatorvoid
setIssuerDN
(X509Name issuer) Set the issuer distinguished name - the issuer is the entity whose private key is used to sign the certificate.void
setNotAfter
(Date date) void
setNotBefore
(Date date) void
setPublicKey
(PublicKey key) void
setSerialNumber
(BigInteger serialNumber) set the serial number for the certificate.void
setSignatureAlgorithm
(String signatureAlgorithm) void
setSubjectDN
(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).
-