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

org.bouncycastle.asn1.esf.OcspListID Maven / Gradle / Ivy

Go to download

The FIPS 140-3 Bouncy Castle Crypto package is a Java implementation of cryptographic algorithms certified to FIPS 140-3 level 1. This jar contains JCE provider and low-level API for the BC-FJA version 2.0.0, FIPS Certificate #4743. Please see certificate for certified platform details.

There is a newer version: 2.0.0
Show newest version
/***************************************************************/
/******    DO NOT EDIT THIS CLASS bc-java SOURCE FILE     ******/
/***************************************************************/
package org.bouncycastle.asn1.esf;

import java.util.Enumeration;

import org.bouncycastle.asn1.ASN1Object;
import org.bouncycastle.asn1.ASN1Primitive;
import org.bouncycastle.asn1.ASN1Sequence;
import org.bouncycastle.asn1.DERSequence;

/**
 * 
 * OcspListID ::=  SEQUENCE {
 *    ocspResponses  SEQUENCE OF OcspResponsesID
 * }
 * 
*/ public class OcspListID extends ASN1Object { private ASN1Sequence ocspResponses; public static OcspListID getInstance(Object obj) { if (obj instanceof OcspListID) { return (OcspListID)obj; } else if (obj != null) { return new OcspListID(ASN1Sequence.getInstance(obj)); } return null; } private OcspListID(ASN1Sequence seq) { if (seq.size() != 1) { throw new IllegalArgumentException("Bad sequence size: " + seq.size()); } this.ocspResponses = (ASN1Sequence)seq.getObjectAt(0); Enumeration e = this.ocspResponses.getObjects(); while (e.hasMoreElements()) { OcspResponsesID.getInstance(e.nextElement()); } } public OcspListID(OcspResponsesID[] ocspResponses) { this.ocspResponses = new DERSequence(ocspResponses); } public OcspResponsesID[] getOcspResponses() { OcspResponsesID[] result = new OcspResponsesID[this.ocspResponses .size()]; for (int idx = 0; idx < result.length; idx++) { result[idx] = OcspResponsesID.getInstance(this.ocspResponses .getObjectAt(idx)); } return result; } public ASN1Primitive toASN1Primitive() { return new DERSequence(this.ocspResponses); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy