Holder.java
资源名称:security.rar [点击查看]
上传用户:lior1029
上传日期:2013-05-07
资源大小:209k
文件大小:2k
源码类别:
CA认证
开发平台:
Java
- package org.bouncycastle.asn1.x509;
- import org.bouncycastle.asn1.ASN1Sequence;
- import org.bouncycastle.asn1.DERSequence;
- import org.bouncycastle.asn1.DERTaggedObject;
- import org.bouncycastle.asn1.DERObject;
- import org.bouncycastle.asn1.DEREncodable;
- import org.bouncycastle.asn1.ASN1EncodableVector;
- public class Holder
- implements DEREncodable
- {
- IssuerSerial baseCertificateID;
- GeneralNames entityName;
- ObjectDigestInfo objectDigestInfo;
- /**
- * <pre>
- * Holder ::= SEQUENCE {
- * baseCertificateID [0] IssuerSerial OPTIONAL,
- * -- the issuer and serial number of
- * -- the holder's Public Key Certificate
- * entityName [1] GeneralNames OPTIONAL,
- * -- the name of the claimant or role
- * objectDigestInfo [2] ObjectDigestInfo OPTIONAL
- * -- used to directly authenticate the holder,
- * -- for example, an executable
- * }
- * </pre>
- */
- public DERObject getDERObject()
- {
- ASN1EncodableVector v = new ASN1EncodableVector();
- if (baseCertificateID != null)
- {
- v.add(new DERTaggedObject(false, 0, baseCertificateID));
- }
- if (entityName != null)
- {
- v.add(new DERTaggedObject(false, 1, entityName));
- }
- if (objectDigestInfo != null)
- {
- v.add(new DERTaggedObject(false, 2, objectDigestInfo));
- }
- return new DERSequence(v);
- }
- }