summaryrefslogtreecommitdiffstats
path: root/bcpkix/src/main/java/org/bouncycastle/cms/CMSUtils.java
diff options
context:
space:
mode:
authorBrian Carlstrom <bdc@google.com>2013-05-24 19:14:15 -0700
committerBrian Carlstrom <bdc@google.com>2013-06-03 14:01:40 -0700
commita198e1ecc615e26a167d0f2dca9fa7e5fc62de10 (patch)
tree6ac741d0b1ccd61f033299754a0b9a3a54985e18 /bcpkix/src/main/java/org/bouncycastle/cms/CMSUtils.java
parent67e643cbf3cff776bf1a8fe1ea50a14ccf2d41e4 (diff)
downloadandroid_external_bouncycastle-a198e1ecc615e26a167d0f2dca9fa7e5fc62de10.tar.gz
android_external_bouncycastle-a198e1ecc615e26a167d0f2dca9fa7e5fc62de10.tar.bz2
android_external_bouncycastle-a198e1ecc615e26a167d0f2dca9fa7e5fc62de10.zip
bouncycastle 1.49 upgrade
Change-Id: Icbf5a147409c810060a5acc884834fb2a778e860
Diffstat (limited to 'bcpkix/src/main/java/org/bouncycastle/cms/CMSUtils.java')
-rw-r--r--bcpkix/src/main/java/org/bouncycastle/cms/CMSUtils.java33
1 files changed, 33 insertions, 0 deletions
diff --git a/bcpkix/src/main/java/org/bouncycastle/cms/CMSUtils.java b/bcpkix/src/main/java/org/bouncycastle/cms/CMSUtils.java
index 907fcc0..ccfab32 100644
--- a/bcpkix/src/main/java/org/bouncycastle/cms/CMSUtils.java
+++ b/bcpkix/src/main/java/org/bouncycastle/cms/CMSUtils.java
@@ -20,14 +20,21 @@ import java.util.List;
import org.bouncycastle.asn1.ASN1Encodable;
import org.bouncycastle.asn1.ASN1EncodableVector;
import org.bouncycastle.asn1.ASN1InputStream;
+import org.bouncycastle.asn1.ASN1ObjectIdentifier;
import org.bouncycastle.asn1.ASN1Primitive;
import org.bouncycastle.asn1.ASN1Set;
import org.bouncycastle.asn1.BEROctetStringGenerator;
import org.bouncycastle.asn1.BERSet;
import org.bouncycastle.asn1.DERSet;
import org.bouncycastle.asn1.DERTaggedObject;
+import org.bouncycastle.asn1.cms.CMSObjectIdentifiers;
import org.bouncycastle.asn1.cms.ContentInfo;
import org.bouncycastle.asn1.cms.IssuerAndSerialNumber;
+// BEGIN android-removed
+// import org.bouncycastle.asn1.cms.OtherRevocationInfoFormat;
+// import org.bouncycastle.asn1.ocsp.OCSPResponse;
+// import org.bouncycastle.asn1.ocsp.OCSPResponseStatus;
+// END android-removed
import org.bouncycastle.asn1.x509.Certificate;
import org.bouncycastle.asn1.x509.CertificateList;
import org.bouncycastle.asn1.x509.TBSCertificate;
@@ -184,6 +191,32 @@ class CMSUtils
}
}
+ // BEGIN android-removed
+ // static Collection getOthersFromStore(ASN1ObjectIdentifier otherRevocationInfoFormat, Store otherRevocationInfos)
+ // {
+ // List others = new ArrayList();
+ //
+ // for (Iterator it = otherRevocationInfos.getMatches(null).iterator(); it.hasNext();)
+ // {
+ // ASN1Encodable info = (ASN1Encodable)it.next();
+ //
+ // if (CMSObjectIdentifiers.id_ri_ocsp_response.equals(otherRevocationInfoFormat))
+ // {
+ // OCSPResponse resp = OCSPResponse.getInstance(info);
+ //
+ // if (resp.getResponseStatus().getValue().intValue() != OCSPResponseStatus.SUCCESSFUL)
+ // {
+ // throw new IllegalArgumentException("cannot add unsuccessful OCSP response to CMS SignedData");
+ // }
+ // }
+ //
+ // others.add(new DERTaggedObject(false, 1, new OtherRevocationInfoFormat(otherRevocationInfoFormat, info)));
+ // }
+ //
+ // return others;
+ // }
+ // END android-removed
+
static ASN1Set createBerSetFromList(List derObjects)
{
ASN1EncodableVector v = new ASN1EncodableVector();