List of usage examples for org.bouncycastle.asn1 DERSequence DERSequence
public DERSequence(ASN1Encodable[] elements)
From source file:com.novosec.pkix.asn1.crmf.EncryptedValue.java
License:Open Source License
public DERObject getDERObject() { ASN1EncodableVector v = new ASN1EncodableVector(); if (intendedAlg != null) { v.add(new DERTaggedObject(false, 0, intendedAlg)); }/*from ww w .ja v a 2 s . c o m*/ if (symmAlg != null) { v.add(new DERTaggedObject(false, 1, symmAlg)); } if (encSymmKey != null) { v.add(new DERTaggedObject(false, 2, encSymmKey)); } if (keyAlg != null) { v.add(new DERTaggedObject(false, 3, keyAlg)); } if (valueHint != null) { v.add(new DERTaggedObject(false, 4, valueHint)); } v.add(encValue); return new DERSequence(v); }
From source file:com.novosec.pkix.asn1.crmf.OptionalValidity.java
License:Open Source License
public DERObject getDERObject() { ASN1EncodableVector v = new ASN1EncodableVector(); if (notBefore != null) { v.add(new DERTaggedObject(bTimeIsExplicit, 0, notBefore)); }//from w w w. j av a 2 s . c o m if (notAfter != null) { v.add(new DERTaggedObject(bTimeIsExplicit, 1, notAfter)); } return new DERSequence(v); }
From source file:com.novosec.pkix.asn1.crmf.PBMParameter.java
License:Open Source License
public DERObject getDERObject() { ASN1EncodableVector v = new ASN1EncodableVector(); v.add(salt);//from w w w . j a va2 s.c om v.add(owf); v.add(iterationCount); v.add(mac); return new DERSequence(v); }
From source file:com.novosec.pkix.asn1.crmf.PKIPublicationInfo.java
License:Open Source License
public DERObject getDERObject() { ASN1EncodableVector v = new ASN1EncodableVector(); v.add(action);/*from w ww . j a va2s .c om*/ if (pubInfos.size() > 0) { ASN1EncodableVector pubiv = new ASN1EncodableVector(); for (int i = 0; i < pubInfos.size(); i++) { pubiv.add((SinglePubInfo) pubInfos.elementAt(i)); } v.add(new DERSequence(pubiv)); } return new DERSequence(v); }
From source file:com.novosec.pkix.asn1.crmf.PKMACValue.java
License:Open Source License
public DERObject getDERObject() { ASN1EncodableVector v = new ASN1EncodableVector(); v.add(algId); v.add(value); return new DERSequence(v); }
From source file:com.novosec.pkix.asn1.crmf.POPOSigningKey.java
License:Open Source License
public DERObject getDERObject() { ASN1EncodableVector v = new ASN1EncodableVector(); if (poposkInput != null) { v.add(new DERTaggedObject(false, 0, poposkInput)); }// w w w. ja va 2s . co m v.add(algorithmIdentifier); v.add(signature); return new DERSequence(v); }
From source file:com.novosec.pkix.asn1.crmf.POPOSigningKeyInput.java
License:Open Source License
public DERObject getDERObject() { ASN1EncodableVector v = new ASN1EncodableVector(); if (sender != null) { v.add(new DERTaggedObject(false, 0, sender)); } else {/*from www.ja v a 2 s .co m*/ v.add(publicKeyMAC); } v.add(publicKey); return new DERSequence(v); }
From source file:com.novosec.pkix.asn1.crmf.SinglePubInfo.java
License:Open Source License
public DERObject getDERObject() { ASN1EncodableVector v = new ASN1EncodableVector(); v.add(pubMethod);//w w w. j av a 2 s . c o m if (pubLocation != null) { v.add(pubLocation); } return new DERSequence(v); }
From source file:com.otterca.common.crypto.SimplePolicyGeneratorImpl.java
License:Apache License
/** * Get CPS policy information.//from ww w . j a va2 s . co m * * @return */ public PolicyInformation getCpsPolicyInformation() { PolicyInformation cps = null; if (cpsUri != null) { cps = new PolicyInformation(id_qt_cps, new DERSequence(new PolicyQualifierInfo(cpsUri))); } return cps; }
From source file:com.otterca.common.crypto.SimplePolicyGeneratorImpl.java
License:Apache License
/** * Get user notification policy information. * /*from ww w . jav a 2s . co m*/ * @return */ public PolicyInformation getUserNoticePolicyInformation() { PolicyInformation unotice = null; if ((organization != null) && (userNotice != null)) { ASN1EncodableVector noticeNumbers = new ASN1EncodableVector(); if (noticeNumber != null) { noticeNumbers.add(new DERInteger(noticeNumber.intValue())); } NoticeReference noticeReference = new NoticeReference(organization, noticeNumbers); unotice = new PolicyInformation(id_qt_unotice, new DERSequence(new UserNotice(noticeReference, new DisplayText(userNotice)))); } return unotice; }