Package br.net.woodstock.rockframework.security.timestamp

Examples of br.net.woodstock.rockframework.security.timestamp.TimeStampException


        throw new IllegalStateException("TimeStampToken not found in response");
      }

      return BouncyCastleTimeStampHelper.toTimeStamp(timeStampToken);
    } catch (Exception e) {
      throw new TimeStampException(e);
    }
  }
View Full Code Here


        error = e;
      }
    }
    if (!ok) {
      if (error != null) {
        throw new TimeStampException(error);
      }
    }
    return ts;
  }
View Full Code Here

        this.saveResponse(response, dir, id);
      }

      return response.getEncoded();
    } catch (Exception e) {
      throw new TimeStampException(e);
    }
  }
View Full Code Here

    super();
    Assert.notNull(store, "store");
    Assert.notNull(alias, "alias");
    PrivateKeyEntry privateKeyEntry = (PrivateKeyEntry) store.get(alias);
    if (privateKeyEntry == null) {
      throw new TimeStampException("Private key not found for " + alias);
    }
    PrivateKey privateKey = privateKeyEntry.getValue();
    Certificate[] chain = privateKeyEntry.getChain();
    this.init(privateKey, chain);
  }
View Full Code Here

      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

      timeStampResponse.validate(timeStampRequest);

      return timeStampResponse.getEncoded();
    } catch (Exception e) {
      throw new TimeStampException(e);
    }
  }
View Full Code Here

    super();
    Assert.notNull(store, "store");
    Assert.notNull(alias, "alias");
    PrivateKeyEntry privateKeyEntry = (PrivateKeyEntry) store.get(alias, StoreEntryType.PRIVATE_KEY);
    if (privateKeyEntry == null) {
      throw new TimeStampException("Private key not found for " + alias);
    }
    PrivateKey privateKey = privateKeyEntry.getValue();
    Certificate[] chain = privateKeyEntry.getChain();
    this.init(privateKey, chain);
  }
View Full Code Here

      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

      timeStampResponse.validate(timeStampRequest);

      return timeStampResponse.getEncoded();
    } catch (Exception e) {
      throw new TimeStampException(e);
    }
  }
View Full Code Here

      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

TOP

Related Classes of br.net.woodstock.rockframework.security.timestamp.TimeStampException

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.