org.bouncycastle.x509
public class X509V3CertificateGenerator extends Object
Constructor Summary | |
---|---|
X509V3CertificateGenerator() |
Method Summary | |
---|---|
void | addExtension(String oid, boolean critical, DEREncodable value)
add a given extension field for the standard extensions tag (tag 3) |
void | addExtension(DERObjectIdentifier oid, boolean critical, DEREncodable value)
add a given extension field for the standard extensions tag (tag 3) |
void | addExtension(String oid, boolean critical, byte[] value)
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. |
void | addExtension(DERObjectIdentifier oid, boolean critical, byte[] value)
add a given extension field for the standard extensions tag (tag 3) |
void | copyAndAddExtension(String oid, boolean critical, X509Certificate cert)
add a given extension field for the standard extensions tag (tag 3)
copying the extension value from another certificate. |
void | copyAndAddExtension(DERObjectIdentifier oid, boolean critical, X509Certificate cert)
add a given extension field for the standard extensions tag (tag 3)
copying the extension value from another certificate. |
X509Certificate | generate(PrivateKey key)
generate an X509 certificate, based on the current issuer and subject
using the default provider.
|
X509Certificate | generate(PrivateKey key, SecureRandom random)
generate an X509 certificate, based on the current issuer and subject
using the default provider, and the passed in source of randomness
(if required).
|
X509Certificate | generate(PrivateKey key, String provider)
generate an X509 certificate, based on the current issuer and subject,
using the passed in provider for the signing. |
X509Certificate | generate(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 supplied source
of randomness, if required. |
X509Certificate | generateX509Certificate(PrivateKey key)
generate an X509 certificate, based on the current issuer and subject
using the default provider "BC". |
X509Certificate | 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 randomness
(if required). |
X509Certificate | generateX509Certificate(PrivateKey key, String provider)
generate an X509 certificate, based on the current issuer and subject,
using the passed in provider for the signing. |
X509Certificate | 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 supplied source
of randomness, if required. |
Iterator | getSignatureAlgNames()
Return an iterator of the signature names supported by the generator.
|
void | reset()
reset the generator |
void | setIssuerDN(X500Principal issuer)
Set the issuer distinguished name - the issuer is the entity whose private key is used to sign the
certificate. |
void | 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)
Set the signature algorithm. |
void | setSubjectDN(X500Principal subject)
Set the subject distinguished name. |
void | setSubjectDN(X509Name subject)
Set the subject distinguished name. |
Throws: CertificateParsingException if the extension cannot be extracted.
Throws: CertificateParsingException if the extension cannot be extracted.
Note: this differs from the deprecated method in that the default provider is used - not "BC".
Note: this differs from the deprecated method in that the default provider is used - not "BC".
Deprecated: use generate(key, "BC")
generate an X509 certificate, based on the current issuer and subject using the default provider "BC".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).Deprecated: use generate()
generate an X509 certificate, based on the current issuer and subject, using the passed in provider for the signing.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.Returns: an iterator containing recognised names.
Parameters: signatureAlgorithm string representation of the algorithm name.