All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.bouncycastle.oer.its.Certificate Maven / Gradle / Ivy

Go to download

The Bouncy Castle Java APIs for ASN.1 extension and utility APIs used to support bcpkix and bctls. This jar contains APIs for JDK 1.5 and up.

The newest version!
package org.bouncycastle.oer.its;

/**
 * Certificate ::= CertificateBase (ImplicitCertificate | ExplicitCertificate)
 */
public class Certificate
{

    // ContentSigner & ContentVerifier

    private final CertificateBase certificateBase;

    public Certificate(CertificateBase certificateBase)
    {
        this.certificateBase = certificateBase;
    }

    public static Certificate getInstance(Object value)
    {
        if (value instanceof Certificate)
        {
            return (Certificate)value;
        }
        else
        {
            return new Builder()
                .setCertificateBase(CertificateBase.getInstance(value)).createCertificate();
        }
    }

    public static Builder builder()
    {
        return new Builder();
    }

    public CertificateBase getCertificateBase()
    {
        return certificateBase;
    }

    public static class Builder
    {

        private CertificateBase certificateBase;

        public Builder setCertificateBase(CertificateBase certificateBase)
        {
            this.certificateBase = certificateBase;
            return this;
        }

        public Certificate createCertificate()
        {
            return new Certificate(certificateBase);
        }
    }


}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy