⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 crlid.java

📁 说明: 1、里面有什么: 1.1、org.bouncycastle.*下的所有软件是bouncycastle组织开发的软件包 1.2、org.infosecurity.*下的软件包括
💻 JAVA
字号:
package org.bouncycastle.asn1.ocsp;import java.util.Enumeration;import org.bouncycastle.asn1.ASN1Sequence;import org.bouncycastle.asn1.ASN1TaggedObject;import org.bouncycastle.asn1.DERIA5String;import org.bouncycastle.asn1.DERObject;import org.bouncycastle.asn1.DERInteger;import org.bouncycastle.asn1.DERSequence;import org.bouncycastle.asn1.DERTaggedObject;import org.bouncycastle.asn1.DEREncodable;import org.bouncycastle.asn1.ASN1EncodableVector;import org.bouncycastle.asn1.DERGeneralizedTime;public class CrlID    implements DEREncodable{	DERIA5String	    crlUrl;	DERInteger		    crlNum;	DERGeneralizedTime	crlTime;	public CrlID(		ASN1Sequence	seq)	{		Enumeration	e = seq.getObjects();		while (e.hasMoreElements())		{			ASN1TaggedObject	o = (ASN1TaggedObject)e.nextElement();			switch (o.getTagNo())			{			case 0:				crlUrl = DERIA5String.getInstance(o, true);				break;			case 1:				crlNum = DERInteger.getInstance(o, true);				break;			case 2:				crlTime = DERGeneralizedTime.getInstance(o, true);				break;			default:				throw new IllegalArgumentException(						"unknown tag number: " + o.getTagNo());			}		}	}	public DERIA5String getCrlUrl()	{		return crlUrl;	}	public DERInteger getCrlNum()	{		return crlNum;	}	public DERGeneralizedTime getCrlTime()	{		return crlTime;	}    /**	 * <pre>     * CrlID ::= SEQUENCE {     *     crlUrl               [0]     EXPLICIT IA5String OPTIONAL,     *     crlNum               [1]     EXPLICIT INTEGER OPTIONAL,     *     crlTime              [2]     EXPLICIT GeneralizedTime OPTIONAL }	 * </pre>	 */	public DERObject getDERObject()	{		ASN1EncodableVector	v = new ASN1EncodableVector();		if (crlUrl != null)		{			v.add(new DERTaggedObject(true, 0, crlUrl));		}		if (crlNum != null)		{			v.add(new DERTaggedObject(true, 1, crlNum));		}		if (crlTime != null)		{			v.add(new DERTaggedObject(true, 2, crlTime));		}		return new DERSequence(v);	}}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -