Examples of JcaCertStore


Examples of org.bouncycastle.cert.jcajce.JcaCertStore

                        OperatorCreationException,
                        CMSException {

        ArrayList<X509Certificate> certList = new ArrayList<X509Certificate>();
        certList.add(publicKey);
        JcaCertStore certs = new JcaCertStore(certList);

        CMSSignedDataGenerator gen = new CMSSignedDataGenerator();
        ContentSigner sha1Signer = new JcaContentSignerBuilder(
                                       "SHA1with" + privateKey.getAlgorithm())
                                   .build(privateKey);
View Full Code Here

Examples of org.bouncycastle.cert.jcajce.JcaCertStore

      DigestCalculator digestCalculator = digestCalculatorProvider.get(signerInfoGenerator.getDigestAlgorithm());

      this.timeStampTokenGenerator = new TimeStampTokenGenerator(digestCalculator, signerInfoGenerator, new ASN1ObjectIdentifier(BouncyCastleTimeStampServer.TSA_POLICY_ID));

      JcaCertStore certStore = new JcaCertStore(Arrays.asList(chain));
      this.timeStampTokenGenerator.addCertificates(certStore);
    } catch (Exception e) {
      throw new TimeStampException(e);
    }
  }
View Full Code Here

Examples of org.bouncycastle.cert.jcajce.JcaCertStore

                        OperatorCreationException,
                        CMSException {

        ArrayList<X509Certificate> certList = new ArrayList<X509Certificate>();
        certList.add(publicKey);
        JcaCertStore certs = new JcaCertStore(certList);

        CMSSignedDataGenerator gen = new CMSSignedDataGenerator();
        ContentSigner sha1Signer = new JcaContentSignerBuilder(
                                       "SHA1with" + privateKey.getAlgorithm())
                                   .build(privateKey);
View Full Code Here

Examples of org.bouncycastle.cert.jcajce.JcaCertStore

      SignerInfoGenerator signerInfoGenerator = signerInfoGeneratorBuilder.build(contentSigner, (X509Certificate) certificate);

      this.timeStampTokenGenerator = new TimeStampTokenGenerator(signerInfoGenerator, new ASN1ObjectIdentifier(BouncyCastleTimeStampServer.TSA_POLICY_ID));

      JcaCertStore certStore = new JcaCertStore(Arrays.asList(chain));
      this.timeStampTokenGenerator.addCertificates(certStore);
    } catch (Exception e) {
      throw new TimeStampException(e);
    }
  }
View Full Code Here

Examples of org.bouncycastle.cert.jcajce.JcaCertStore

    ArrayList<Certificate> list = new ArrayList<Certificate>();
    // TODO
    // for (CertificateHolder certificateHolder : this.signRequest.getCertificates()) {
    // list.add(certificateHolder.getCertificate());
    // }
    JcaCertStore certStore = new JcaCertStore(list);
    return certStore;
  }
View Full Code Here

Examples of org.bouncycastle.cert.jcajce.JcaCertStore

                        OperatorCreationException,
                        CMSException {

        ArrayList<X509Certificate> certList = new ArrayList<X509Certificate>();
        certList.add(publicKey);
        JcaCertStore certs = new JcaCertStore(certList);

        CMSSignedDataGenerator gen = new CMSSignedDataGenerator();
        ContentSigner sha1Signer = new JcaContentSignerBuilder(
                                       "SHA1with" + privateKey.getAlgorithm())
                                   .build(privateKey);
View Full Code Here

Examples of org.bouncycastle.cert.jcajce.JcaCertStore

      SignerInfoGenerator signerInfoGenerator = signerInfoGeneratorBuilder.build(contentSigner, (X509Certificate) certificate);

      this.timeStampTokenGenerator = new TimeStampTokenGenerator(signerInfoGenerator, new ASN1ObjectIdentifier(BouncyCastleTimeStampServer.TSA_POLICY_ID));

      JcaCertStore certStore = new JcaCertStore(Arrays.asList(chain));
      this.timeStampTokenGenerator.addCertificates(certStore);
    } catch (Exception e) {
      throw new TimeStampException(e);
    }
  }
View Full Code Here

Examples of org.bouncycastle.cert.jcajce.JcaCertStore

      CMSTypedData msg = new CMSProcessableByteArray(theBytes);

      X509Certificate signCert = (X509Certificate) myKeyStore.getCertificate(myKeyAlias);
      certList.add(signCert);

      Store certs = new JcaCertStore(certList);

      CMSSignedDataGenerator gen = new CMSSignedDataGenerator();
      ContentSigner sha1Signer = new JcaContentSignerBuilder(myAlgorithm).setProvider("BC").build(getPrivateKey());

      gen.addSignerInfoGenerator(new JcaSignerInfoGeneratorBuilder(new JcaDigestCalculatorProviderBuilder().setProvider("BC").build()).build(sha1Signer, signCert));
View Full Code Here

Examples of org.bouncycastle.cert.jcajce.JcaCertStore

    return fullContentInfo.getDEREncoded();
  }

  protected Store getCertificateStore(final Certificate[] chain) throws CertificateEncodingException {
    List<Certificate> list = Arrays.asList(chain);
    JcaCertStore certStore = new JcaCertStore(list);
    return certStore;
  }
View Full Code Here

Examples of org.bouncycastle.cert.jcajce.JcaCertStore

      DigestCalculator digestCalculator = digestCalculatorProvider.get(signerInfoGenerator.getDigestAlgorithm());

      this.timeStampTokenGenerator = new TimeStampTokenGenerator(digestCalculator, signerInfoGenerator, new ASN1ObjectIdentifier(BouncyCastleTimeStampServer.TSA_POLICY_ID));

      JcaCertStore certStore = new JcaCertStore(Arrays.asList(chain));
      this.timeStampTokenGenerator.addCertificates(certStore);
    } catch (Exception e) {
      throw new TimeStampException(e);
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.