Package org.bouncycastle.cms

Examples of org.bouncycastle.cms.CMSAbsentContent


  Store certs = new JcaCertStore(Collections.singleton(cert));
  gen.addSignerInfoGenerator(new JcaSignerInfoGeneratorBuilder(
    new JcaDigestCalculatorProviderBuilder().build()).build(
    sha1Signer, cert));
  gen.addCertificates(certs);
  CMSTypedData msg = new CMSAbsentContent();
  CMSSignedData sigData = gen.generate(msg, false);

  params.add(new Object[] { new GetCert(transId, senderNonce, iasn) });
  params.add(new Object[] { new GetCertInitial(transId, senderNonce, ias) });
  params.add(new Object[] { new GetCrl(transId, senderNonce, iasn) });
View Full Code Here


      ioe.initCause(e);

      throw ioe;
  }
  generator.addCertificates(store);
  return generator.generate(new CMSAbsentContent());
    }
View Full Code Here

      store = new JcaCRLStore(Collections.emptyList());
  } else {
      store = new JcaCRLStore(Collections.singleton(crl));
  }
  generator.addCertificates(store);
  return generator.generate(new CMSAbsentContent());
    }
View Full Code Here

      SignerInfoGenerator infoGen = infoGenBuilder.build(contentSigner,
        certHolder);
      generator.addSignerInfoGenerator(infoGen);

      CMSSignedData degenerateSd = generator
        .generate(new CMSAbsentContent());
      byte[] bytes = degenerateSd.getEncoded();

      res.getOutputStream().write(bytes);
      res.getOutputStream().close();
  }
View Full Code Here

    throw ioe;
      }
      generator.addCertificates(store);
      CMSSignedData degenerateSd = generator
        .generate(new CMSAbsentContent());
      bytes = degenerateSd.getEncoded();
  }

  res.getOutputStream().write(bytes);
  res.getOutputStream().close();
View Full Code Here

        signable = new CMSProcessableByteArray(ed.getEncoded());
      } catch (IOException e) {
        throw new MessageEncodingException(e);
      }
    } else {
      signable = new CMSAbsentContent();
    }
    return signable;
  }
View Full Code Here

  public void write(final Certificate[] chain, final OutputStream outputStream) {
    Assert.notEmpty(chain, "chain");
    Assert.notNull(outputStream, "outputStream");
    try {
      CMSSignedDataGenerator signedDataGenerator = new CMSSignedDataGenerator();
      CMSTypedData content = new CMSAbsentContent();

      signedDataGenerator.addCertificates(BouncyCastleProviderHelper.toStore(chain));

      CMSSignedData signedData = signedDataGenerator.generate(content, false);
      byte[] bytes = signedData.getEncoded();
View Full Code Here

      CMSTypedData content = null;
      boolean encapsulate = true;

      if (this.parameters.isDataDigested()) {
        content = new CMSAbsentContent();
        encapsulate = false;
      } else {
        if ((this.parameters.isMergeSignatures()) && (this.isSigned(data))) {
          CMSSignedData signedData = new CMSSignedData(data);
          signedDataGenerator.addSigners(signedData.getSignerInfos());
View Full Code Here

      CMSTypedData content = null;
      boolean encapsulate = true;

      if (this.parameters.isDataDigested()) {
        content = new CMSAbsentContent();
        encapsulate = false;
      } else {
        if ((this.parameters.isMergeSignatures()) && (this.isSigned(data))) {
          CMSSignedData signedData = new CMSSignedData(data);
          signedDataGenerator.addSigners(signedData.getSignerInfos());
View Full Code Here

      CMSTypedData content = null;
      boolean encapsulate = true;

      if (this.parameters.isDataDigested()) {
        content = new CMSAbsentContent();
        encapsulate = false;
      } else {
        if ((this.parameters.isMergeSignatures()) && (this.isSigned(data))) {
          CMSSignedData signedData = new CMSSignedData(data);
          signedDataGenerator.addSigners(signedData.getSignerInfos());
View Full Code Here

TOP

Related Classes of org.bouncycastle.cms.CMSAbsentContent

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.