public static SignedData getInstance( Object o) { if (o instanceof SignedData) { return (SignedData)o; } else if (o != null) { return new SignedData(ASN1Sequence.getInstance(o)); } return null; }
/** * Constructs DVCRequest from CMS SignedData object. * * @param signedData the CMS SignedData object containing the request * @throws DVCSConstructionException */ public DVCSRequest(CMSSignedData signedData) throws DVCSConstructionException { this(SignedData.getInstance(signedData.toASN1Structure().getContent()).getEncapContentInfo()); }
/** * Return if this is object represents a detached signature. * * @return true if this message represents a detached signature, false otherwise. */ public boolean isDetachedSignature() { return signedData.getEncapContentInfo().getContent() == null && signedData.getSignerInfos().size() > 0; }
cms.signedData = new SignedData(signedData.signedData.getDigestAlgorithms(), signedData.signedData.getEncapContentInfo(), certSet, crlSet, signedData.signedData.getSignerInfos());
ASN1Set certificates = null; try { final SignedData sd = SignedData.getInstance(contentSignedData); signerInfosSd = sd.getSignerInfos(); certificates = sd.getCertificates();
final SignedData sd = SignedData.getInstance(datos); final ASN1Set signerInfosSd = sd.getSignerInfos();
ASN1Sequence sD = (ASN1Sequence)signedData.signedData.toASN1Primitive(); cms.signedData = SignedData.getInstance(new BERSequence(vec));
public ASN1ObjectIdentifier getContentType() { return signedData.getEncapContentInfo().getContentType(); }
private SignedData getSignedData() throws CMSException { try { return SignedData.getInstance(contentInfo.getContent()); } catch (ClassCastException e) { throw new CMSException("Malformed content.", e); } catch (IllegalArgumentException e) { throw new CMSException("Malformed content.", e); } }
/** * Return any X.509 certificate objects in this SignedData structure as a Store of X509CertificateHolder objects. * * @return a Store of X509CertificateHolder objects. */ public Store getCertificates() { return HELPER.getCertificates(signedData.getCertificates()); }
/** * Return any X.509 CRL objects in this SignedData structure as a Store of X509CRLHolder objects. * * @return a Store of X509CRLHolder objects. */ public Store getCRLs() { return HELPER.getCRLs(signedData.getCRLs()); }
/** * Return the version number for this object */ public int getVersion() { return signedData.getVersion().getValue().intValue(); }
/** * Return the digest algorithm identifiers for the SignedData object * * @return the set of digest algorithm identifiers */ public Set<AlgorithmIdentifier> getDigestAlgorithmIDs() { Set<AlgorithmIdentifier> digests = new HashSet<AlgorithmIdentifier>(signedData.getDigestAlgorithms().size()); for (Enumeration en = signedData.getDigestAlgorithms().getObjects(); en.hasMoreElements();) { digests.add(AlgorithmIdentifier.getInstance(en.nextElement())); } return Collections.unmodifiableSet(digests); }
public SignedData( ASN1Set digestAlgorithms, ContentInfo contentInfo, ASN1Set certificates, ASN1Set crls, ASN1Set signerInfos) { this.version = calculateVersion(contentInfo.getContentType(), certificates, crls, signerInfos); this.digestAlgorithms = digestAlgorithms; this.contentInfo = contentInfo; this.certificates = certificates; this.crls = crls; this.signerInfos = signerInfos; this.crlsBer = crls instanceof BERSet; this.certsBer = certificates instanceof BERSet; }
if (checkForVersion3(signerInfs))
cms.signedData = new SignedData(signedData.signedData.getDigestAlgorithms(), signedData.signedData.getEncapContentInfo(), certSet, crlSet, signedData.signedData.getSignerInfos());
final SignedData sd = SignedData.getInstance(datos); final ASN1Set signerInfosSd = sd.getSignerInfos();
ASN1Sequence sD = (ASN1Sequence)signedData.signedData.toASN1Primitive(); cms.signedData = SignedData.getInstance(new BERSequence(vec));
public ASN1ObjectIdentifier getContentType() { return signedData.getEncapContentInfo().getContentType(); }
private SignedData getSignedData() throws CMSException { try { return SignedData.getInstance(contentInfo.getContent()); } catch (ClassCastException e) { throw new CMSException("Malformed content.", e); } catch (IllegalArgumentException e) { throw new CMSException("Malformed content.", e); } }