public ContentInfoParser getEncapContentInfo() throws IOException { return new ContentInfoParser((ASN1SequenceParser)_seq.readObject()); }
private void initialize(ContentInfoParser contentInfo) throws CMSException { try { if (CMSObjectIdentifiers.timestampedData.equals(contentInfo.getContentType())) { this.timeStampedData = TimeStampedDataParser.getInstance(contentInfo.getContent(BERTags.SEQUENCE)); } else { throw new IllegalArgumentException("Malformed content - type must be " + CMSObjectIdentifiers.timestampedData.getId()); } } catch (IOException e) { throw new CMSException("parsing exception: " + e.getMessage(), e); } }
ContentInfoParser contentInfo = new ContentInfoParser((ASN1SequenceParser)in.readObject()); SignedDataParser signedData = SignedDataParser.getInstance(contentInfo.getContent(BERTags.SEQUENCE)); eiGen.addObject(encapContentInfo.getContentType());
encapContentInfo.getContent(BERTags.OCTET_STRING);
ContentInfoParser contentInfo = new ContentInfoParser((ASN1SequenceParser)in.readObject()); SignedDataParser signedData = SignedDataParser.getInstance(contentInfo.getContent(BERTags.SEQUENCE)); eiGen.addObject(encapContentInfo.getContentType());
encapContentInfo.getContent(BERTags.OCTET_STRING);
ContentInfoParser contentInfo = new ContentInfoParser((ASN1SequenceParser)in.readObject()); SignedDataParser signedData = SignedDataParser.getInstance(contentInfo.getContent(BERTags.SEQUENCE)); eiGen.addObject(encapContentInfo.getContentType());
public ContentInfoParser getEncapContentInfo() throws IOException { return new ContentInfoParser((ASN1SequenceParser)_seq.readObject()); }
private void initialize(ContentInfoParser contentInfo) throws CMSException { try { if (CMSObjectIdentifiers.timestampedData.equals(contentInfo.getContentType())) { this.timeStampedData = TimeStampedDataParser.getInstance(contentInfo.getContent(BERTags.SEQUENCE)); } else { throw new IllegalArgumentException("Malformed content - type must be " + CMSObjectIdentifiers.timestampedData.getId()); } } catch (IOException e) { throw new CMSException("parsing exception: " + e.getMessage(), e); } }
this.envelopedData = new EnvelopedDataParser((ASN1SequenceParser)_contentInfo.getContent(BERTags.SEQUENCE));
ContentInfoParser contentInfo = new ContentInfoParser((ASN1SequenceParser)in.readObject()); SignedDataParser signedData = SignedDataParser.getInstance(contentInfo.getContent(BERTags.SEQUENCE)); eiGen.addObject(encapContentInfo.getContentType());
public ContentInfoParser getEnapsulatedContentInfo() throws IOException { if (nextObject == null) { nextObject = seq.readObject(); } if (nextObject != null) { ASN1SequenceParser o = (ASN1SequenceParser)nextObject; nextObject = null; return new ContentInfoParser(o); } return null; }
/** * Return a typed stream which will allow the reading of the compressed content in * expanded form. * * @param expanderProvider a provider of expander algorithm implementations. * @return a type stream which will yield the un-compressed content. * @throws CMSException if there is an exception parsing the CompressedData object. */ public CMSTypedStream getContent(InputExpanderProvider expanderProvider) throws CMSException { try { CompressedDataParser comData = new CompressedDataParser((ASN1SequenceParser)_contentInfo.getContent(BERTags.SEQUENCE)); ContentInfoParser content = comData.getEncapContentInfo(); InputExpander expander = expanderProvider.get(comData.getCompressionAlgorithmIdentifier()); ASN1OctetStringParser bytes = (ASN1OctetStringParser)content.getContent(BERTags.OCTET_STRING); return new CMSTypedStream(content.getContentType().getId(), expander.getInputStream(bytes.getOctetStream())); } catch (IOException e) { throw new CMSException("IOException reading compressed content.", e); } } }
this.envelopedData = new EnvelopedDataParser((ASN1SequenceParser)_contentInfo.getContent(BERTags.SEQUENCE));
public ContentInfoParser getEncapsulatedContentInfo() throws IOException { if (nextObject == null) { nextObject = seq.readObject(); } if (nextObject != null) { ASN1SequenceParser o = (ASN1SequenceParser)nextObject; nextObject = null; return new ContentInfoParser(o); } return null; }
/** * Return a typed stream which will allow the reading of the compressed content in * expanded form. * * @param expanderProvider a provider of expander algorithm implementations. * @return a type stream which will yield the un-compressed content. * @throws CMSException if there is an exception parsing the CompressedData object. */ public CMSTypedStream getContent(InputExpanderProvider expanderProvider) throws CMSException { try { CompressedDataParser comData = new CompressedDataParser((ASN1SequenceParser)_contentInfo.getContent(BERTags.SEQUENCE)); ContentInfoParser content = comData.getEncapContentInfo(); InputExpander expander = expanderProvider.get(comData.getCompressionAlgorithmIdentifier()); ASN1OctetStringParser bytes = (ASN1OctetStringParser)content.getContent(BERTags.OCTET_STRING); return new CMSTypedStream(content.getContentType().getId(), expander.getInputStream(bytes.getOctetStream())); } catch (IOException e) { throw new CMSException("IOException reading compressed content.", e); } } }
this.authData = new AuthenticatedDataParser((ASN1SequenceParser)_contentInfo.getContent(BERTags.SEQUENCE)); ((ASN1OctetStringParser)data.getContent(BERTags.OCTET_STRING)).getOctetStream()); ((ASN1OctetStringParser)data.getContent(BERTags.OCTET_STRING)).getOctetStream());
public CompressedDataParser( ASN1SequenceParser seq) throws IOException { this._version = (ASN1Integer)seq.readObject(); this._compressionAlgorithm = AlgorithmIdentifier.getInstance(seq.readObject().toASN1Primitive()); this._encapContentInfo = new ContentInfoParser((ASN1SequenceParser)seq.readObject()); }
_signedData = SignedDataParser.getInstance(_contentInfo.getContent(BERTags.SEQUENCE)); digests = new HashMap(); ASN1Encodable contentParser = cont.getContent(BERTags.OCTET_STRING); cont.getContentType(), octs.getOctetStream()); PKCS7TypedStream pkcs7Stream = new PKCS7TypedStream(cont.getContentType(), contentParser); _signedContentType = cont.getContentType();
this.authData = new AuthenticatedDataParser((ASN1SequenceParser)_contentInfo.getContent(BERTags.SEQUENCE)); ((ASN1OctetStringParser)data.getContent(BERTags.OCTET_STRING)).getOctetStream()); ((ASN1OctetStringParser)data.getContent(BERTags.OCTET_STRING)).getOctetStream());