Package org.bouncycastle.cms

Examples of org.bouncycastle.cms.CMSAttributeTableGenerator


    v.add(certHAttribute);
    /**
     * -- END CADES --
     */
    AttributeTable at = new AttributeTable(v);
    CMSAttributeTableGenerator attrGen = new DefaultSignedAttributeTableGenerator(at);
    SignerInfoGeneratorBuilder genBuild =
       new SignerInfoGeneratorBuilder(new BcDigestCalculatorProvider());
    genBuild.setSignedAttributeGenerator(attrGen);
    SignerInfoGenerator sifGen =
       genBuild.build(sigGen, new X509CertificateHolder(userCertificate.getEncoded()));
View Full Code Here


  }

  private CMSAttributeTableGenerator getTableGenerator(PkiMessage<?> message) {
    AttributeTableFactory attrFactory = new AttributeTableFactory();
    AttributeTable signedAttrs = attrFactory.fromPkiMessage(message);
    CMSAttributeTableGenerator atGen = new DefaultSignedAttributeTableGenerator(
        signedAttrs);
    return atGen;
  }
View Full Code Here

        CertStore           certs = CertStore.getInstance("Collection",
                        new CollectionCertStoreParameters(certList), "BC");

        CMSSignedDataStreamGenerator gen = new CMSSignedDataStreamGenerator();

        CMSAttributeTableGenerator signedGen = new DefaultSignedAttributeTableGenerator()
        {
            public AttributeTable getAttributes(Map parameters)
            {
                Hashtable table = createStandardAttributeTable(parameters);

                DEROctetString val = new DEROctetString((byte[])parameters.get(CMSAttributeTableGenerator.DIGEST));
                Attribute attr = new Attribute(dummyOid1, new DERSet(val));

                table.put(attr.getAttrType(), attr);

                return new AttributeTable(table);
            }
        };

        CMSAttributeTableGenerator unsignedGen = new CMSAttributeTableGenerator()
        {
            public AttributeTable getAttributes(Map parameters)
            {
                DEROctetString val = new DEROctetString((byte[])parameters.get(CMSAttributeTableGenerator.SIGNATURE));
                Attribute attr = new Attribute(dummyOid2, new DERSet(val));
View Full Code Here

TOP

Related Classes of org.bouncycastle.cms.CMSAttributeTableGenerator

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.