org.bouncycastle.oer.its.Certificate Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bcutil-jdk15on Show documentation
Show all versions of bcutil-jdk15on Show documentation
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);
}
}
}