Class X509v3CertificateBuilder

java.lang.Object
eu.emi.security.authn.x509.helpers.proxy.X509v3CertificateBuilder

public class X509v3CertificateBuilder extends Object
Class to produce an X.509 Version 3 certificate. Based on the BC bcmail library and deprecated class of the BC. We don't use BC mail as adding an another big dependency only for the certificate creation doesn't make much sense.
  • Constructor Summary

    Constructors
    Constructor
    Description
    X509v3CertificateBuilder(org.bouncycastle.asn1.x500.X500Name issuer, BigInteger serial, Date notBefore, Date notAfter, org.bouncycastle.asn1.x500.X500Name subject, org.bouncycastle.asn1.x509.SubjectPublicKeyInfo publicKeyInfo)
    Create a builder for a version 3 certificate.
  • Method Summary

    Modifier and Type
    Method
    Description
    addExtension(org.bouncycastle.asn1.ASN1ObjectIdentifier oid, boolean isCritical, org.bouncycastle.asn1.ASN1Object value)
    Add a given extension field for the standard extensions tag (tag 3)
    build(PrivateKey key, org.bouncycastle.asn1.x509.AlgorithmIdentifier sigAlg, String sigAlgName, String provider, SecureRandom random)
    Generate the certificate, signing it with the provided private key and using the specified algorithm.
    static org.bouncycastle.asn1.x509.AlgorithmIdentifier
    Extracts the full algorithm identifier from the given certificate.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • X509v3CertificateBuilder

      public X509v3CertificateBuilder(org.bouncycastle.asn1.x500.X500Name issuer, BigInteger serial, Date notBefore, Date notAfter, org.bouncycastle.asn1.x500.X500Name subject, org.bouncycastle.asn1.x509.SubjectPublicKeyInfo publicKeyInfo)
      Create a builder for a version 3 certificate.
      Parameters:
      issuer - the certificate issuer
      serial - the certificate serial number
      notBefore - the date before which the certificate is not valid
      notAfter - the date after which the certificate is not valid
      subject - the certificate subject
      publicKeyInfo - the info structure for the public key to be associated with this certificate.
  • Method Details