diff options
Diffstat (limited to 'libraries/spongycastle/core/src/main/java/org/spongycastle/asn1/cmp/RevRepContentBuilder.java')
-rw-r--r-- | libraries/spongycastle/core/src/main/java/org/spongycastle/asn1/cmp/RevRepContentBuilder.java | 59 |
1 files changed, 0 insertions, 59 deletions
diff --git a/libraries/spongycastle/core/src/main/java/org/spongycastle/asn1/cmp/RevRepContentBuilder.java b/libraries/spongycastle/core/src/main/java/org/spongycastle/asn1/cmp/RevRepContentBuilder.java deleted file mode 100644 index d154f17c2..000000000 --- a/libraries/spongycastle/core/src/main/java/org/spongycastle/asn1/cmp/RevRepContentBuilder.java +++ /dev/null @@ -1,59 +0,0 @@ -package org.spongycastle.asn1.cmp; - -import org.spongycastle.asn1.ASN1EncodableVector; -import org.spongycastle.asn1.DERSequence; -import org.spongycastle.asn1.DERTaggedObject; -import org.spongycastle.asn1.crmf.CertId; -import org.spongycastle.asn1.x509.CertificateList; - -public class RevRepContentBuilder -{ - private ASN1EncodableVector status = new ASN1EncodableVector(); - private ASN1EncodableVector revCerts = new ASN1EncodableVector(); - private ASN1EncodableVector crls = new ASN1EncodableVector(); - - public RevRepContentBuilder add(PKIStatusInfo status) - { - this.status.add(status); - - return this; - } - - public RevRepContentBuilder add(PKIStatusInfo status, CertId certId) - { - if (this.status.size() != this.revCerts.size()) - { - throw new IllegalStateException("status and revCerts sequence must be in common order"); - } - this.status.add(status); - this.revCerts.add(certId); - - return this; - } - - public RevRepContentBuilder addCrl(CertificateList crl) - { - this.crls.add(crl); - - return this; - } - - public RevRepContent build() - { - ASN1EncodableVector v = new ASN1EncodableVector(); - - v.add(new DERSequence(status)); - - if (revCerts.size() != 0) - { - v.add(new DERTaggedObject(true, 0, new DERSequence(revCerts))); - } - - if (crls.size() != 0) - { - v.add(new DERTaggedObject(true, 1, new DERSequence(crls))); - } - - return RevRepContent.getInstance(new DERSequence(v)); - } -} |