Package org.bouncycastle.tsp

Examples of org.bouncycastle.tsp.TimeStampTokenGenerator


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

      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


  public Timestamper(KeystoreHandler handler) {
    this.keystore = handler;
  }
 
  public TimeStampResponse timestamp(TimeStampRequest timestampRequest)  {
    TimeStampTokenGenerator tokenGenerator = createTokenGenerator(timestampRequest);
   
    TimeStampResponseGenerator respGen = new TimeStampResponseGenerator(
        tokenGenerator, TSPAlgorithms.ALLOWED);
   
    Date tsDate = new Date();
View Full Code Here

        keystore.getCertificate());
    } catch (Exception e) {
      throw new RuntimeException("Could not create signer info generator", e);
    }
        try {
      return new TimeStampTokenGenerator(signerInfoGen, new ASN1ObjectIdentifier("1.2.3"));
    } catch (Exception e) {
      throw new RuntimeException("Could not create timestamp token generator", e);
    }
  }
View Full Code Here

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

      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

      JcaSignerInfoGeneratorBuilder signerInfoGeneratorBuilder = new JcaSignerInfoGeneratorBuilder(digestCalculatorProvider);

      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

      JcaSignerInfoGeneratorBuilder signerInfoGeneratorBuilder = new JcaSignerInfoGeneratorBuilder(digestCalculatorProvider);

      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

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

      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

Related Classes of org.bouncycastle.tsp.TimeStampTokenGenerator

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.