Package org.bouncycastle.x509
Class X509V3CertificateGenerator
- java.lang.Object
-
- org.bouncycastle.x509.X509V3CertificateGenerator
-
public class X509V3CertificateGenerator extends Object
Deprecated.use org.bouncycastle.cert.X509v3CertificateBuilder.class to produce an X.509 Version 3 certificate.
-
-
Constructor Summary
Constructors Constructor Description X509V3CertificateGenerator()Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddExtension(String oid, boolean critical, byte[] value)Deprecated.add a given extension field for the standard extensions tag (tag 3) The value parameter becomes the contents of the octet string associated with the extension.voidaddExtension(String oid, boolean critical, ASN1Encodable value)Deprecated.add a given extension field for the standard extensions tag (tag 3)voidaddExtension(ASN1ObjectIdentifier oid, boolean critical, byte[] value)Deprecated.add a given extension field for the standard extensions tag (tag 3)voidaddExtension(ASN1ObjectIdentifier oid, boolean critical, ASN1Encodable value)Deprecated.add a given extension field for the standard extensions tag (tag 3)voidcopyAndAddExtension(String oid, boolean critical, X509Certificate cert)Deprecated.add a given extension field for the standard extensions tag (tag 3) copying the extension value from another certificate.voidcopyAndAddExtension(ASN1ObjectIdentifier oid, boolean critical, X509Certificate cert)Deprecated.add a given extension field for the standard extensions tag (tag 3) copying the extension value from another certificate.X509Certificategenerate(PrivateKey key)Deprecated.generate an X509 certificate, based on the current issuer and subject using the default provider.X509Certificategenerate(PrivateKey key, String provider)Deprecated.generate an X509 certificate, based on the current issuer and subject, using the passed in provider for the signing.X509Certificategenerate(PrivateKey key, String provider, SecureRandom random)Deprecated.generate an X509 certificate, based on the current issuer and subject, using the passed in provider for the signing and the supplied source of randomness, if required.X509Certificategenerate(PrivateKey key, SecureRandom random)Deprecated.generate an X509 certificate, based on the current issuer and subject using the default provider, and the passed in source of randomness (if required).X509CertificategenerateX509Certificate(PrivateKey key)Deprecated.use generate(key, "BC")X509CertificategenerateX509Certificate(PrivateKey key, String provider)Deprecated.use generate()X509CertificategenerateX509Certificate(PrivateKey key, String provider, SecureRandom random)Deprecated.use generate()X509CertificategenerateX509Certificate(PrivateKey key, SecureRandom random)Deprecated.use generate(key, random, "BC")IteratorgetSignatureAlgNames()Deprecated.Return an iterator of the signature names supported by the generator.voidreset()Deprecated.reset the generatorvoidsetIssuerDN(X500Principal issuer)Deprecated.Set the issuer distinguished name - the issuer is the entity whose private key is used to sign the certificate.voidsetIssuerDN(X509Name issuer)Deprecated.Set the issuer distinguished name - the issuer is the entity whose private key is used to sign the certificate.voidsetIssuerUniqueID(boolean[] uniqueID)Deprecated.Set the issuer unique ID - note: it is very rare that it is correct to do this.voidsetNotAfter(Date date)Deprecated.voidsetNotBefore(Date date)Deprecated.voidsetPublicKey(PublicKey key)Deprecated.voidsetSerialNumber(BigInteger serialNumber)Deprecated.set the serial number for the certificate.voidsetSignatureAlgorithm(String signatureAlgorithm)Deprecated.Set the signature algorithm.voidsetSubjectDN(X500Principal subject)Deprecated.Set the subject distinguished name.voidsetSubjectDN(X509Name subject)Deprecated.Set the subject distinguished name.voidsetSubjectUniqueID(boolean[] uniqueID)Deprecated.Set the subject unique ID - note: it is very rare that it is correct to do this.
-
-
-
Method Detail
-
reset
public void reset()
Deprecated.reset the generator
-
setSerialNumber
public void setSerialNumber(BigInteger serialNumber)
Deprecated.set the serial number for the certificate.
-
setIssuerDN
public void setIssuerDN(X500Principal issuer)
Deprecated.Set the issuer distinguished name - the issuer is the entity whose private key is used to sign the certificate.
-
setIssuerDN
public void setIssuerDN(X509Name issuer)
Deprecated.Set the issuer distinguished name - the issuer is the entity whose private key is used to sign the certificate.
-
setNotBefore
public void setNotBefore(Date date)
Deprecated.
-
setNotAfter
public void setNotAfter(Date date)
Deprecated.
-
setSubjectDN
public void setSubjectDN(X500Principal subject)
Deprecated.Set the subject distinguished name. The subject describes the entity associated with the public key.
-
setSubjectDN
public void setSubjectDN(X509Name subject)
Deprecated.Set the subject distinguished name. The subject describes the entity associated with the public key.
-
setPublicKey
public void setPublicKey(PublicKey key) throws IllegalArgumentException
Deprecated.- Throws:
IllegalArgumentException
-
setSignatureAlgorithm
public void setSignatureAlgorithm(String signatureAlgorithm)
Deprecated.Set the signature algorithm. This can be either a name or an OID, names are treated as case insensitive.- Parameters:
signatureAlgorithm- string representation of the algorithm name.
-
setSubjectUniqueID
public void setSubjectUniqueID(boolean[] uniqueID)
Deprecated.Set the subject unique ID - note: it is very rare that it is correct to do this.
-
setIssuerUniqueID
public void setIssuerUniqueID(boolean[] uniqueID)
Deprecated.Set the issuer unique ID - note: it is very rare that it is correct to do this.
-
addExtension
public void addExtension(String oid, boolean critical, ASN1Encodable value)
Deprecated.add a given extension field for the standard extensions tag (tag 3)
-
addExtension
public void addExtension(ASN1ObjectIdentifier oid, boolean critical, ASN1Encodable value)
Deprecated.add a given extension field for the standard extensions tag (tag 3)
-
addExtension
public void addExtension(String oid, boolean critical, byte[] value)
Deprecated.add a given extension field for the standard extensions tag (tag 3) The value parameter becomes the contents of the octet string associated with the extension.
-
addExtension
public void addExtension(ASN1ObjectIdentifier oid, boolean critical, byte[] value)
Deprecated.add a given extension field for the standard extensions tag (tag 3)
-
copyAndAddExtension
public void copyAndAddExtension(String oid, boolean critical, X509Certificate cert) throws CertificateParsingException
Deprecated.add a given extension field for the standard extensions tag (tag 3) copying the extension value from another certificate.- Throws:
CertificateParsingException- if the extension cannot be extracted.
-
copyAndAddExtension
public void copyAndAddExtension(ASN1ObjectIdentifier oid, boolean critical, X509Certificate cert) throws CertificateParsingException
Deprecated.add a given extension field for the standard extensions tag (tag 3) copying the extension value from another certificate.- Throws:
CertificateParsingException- if the extension cannot be extracted.
-
generateX509Certificate
public X509Certificate generateX509Certificate(PrivateKey key) throws SecurityException, SignatureException, InvalidKeyException
Deprecated.use generate(key, "BC")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
Deprecated.use generate(key, random, "BC")generate an X509 certificate, based on the current issuer and subject using the default provider "BC", and the passed in source of randomness (if required).
-
generateX509Certificate
public X509Certificate generateX509Certificate(PrivateKey key, String provider) throws NoSuchProviderException, SecurityException, SignatureException, InvalidKeyException
Deprecated.use generate()generate an X509 certificate, based on the current issuer and subject, using the passed in provider for the signing.
-
generateX509Certificate
public X509Certificate generateX509Certificate(PrivateKey key, String provider, SecureRandom random) throws NoSuchProviderException, SecurityException, SignatureException, InvalidKeyException
Deprecated.use generate()generate an X509 certificate, based on the current issuer and subject, using the passed in provider for the signing and the supplied source of randomness, if required.
-
generate
public X509Certificate generate(PrivateKey key) throws CertificateEncodingException, IllegalStateException, NoSuchAlgorithmException, SignatureException, InvalidKeyException
Deprecated.generate an X509 certificate, based on the current issuer and subject using the default provider.Note: this differs from the deprecated method in that the default provider is used - not "BC".
-
generate
public X509Certificate generate(PrivateKey key, SecureRandom random) throws CertificateEncodingException, IllegalStateException, NoSuchAlgorithmException, SignatureException, InvalidKeyException
Deprecated.generate an X509 certificate, based on the current issuer and subject using the default provider, and the passed in source of randomness (if required).Note: this differs from the deprecated method in that the default provider is used - not "BC".
-
generate
public X509Certificate generate(PrivateKey key, String provider) throws CertificateEncodingException, IllegalStateException, NoSuchProviderException, NoSuchAlgorithmException, SignatureException, InvalidKeyException
Deprecated.generate an X509 certificate, based on the current issuer and subject, using the passed in provider for the signing.
-
generate
public X509Certificate generate(PrivateKey key, String provider, SecureRandom random) throws CertificateEncodingException, IllegalStateException, NoSuchProviderException, NoSuchAlgorithmException, SignatureException, InvalidKeyException
Deprecated.generate an X509 certificate, based on the current issuer and subject, using the passed in provider for the signing and the supplied source of randomness, if required.
-
getSignatureAlgNames
public Iterator getSignatureAlgNames()
Deprecated.Return an iterator of the signature names supported by the generator.- Returns:
- an iterator containing recognised names.
-
-