Search in sources :

Example 6 with TimeStampOperator

use of org.demoiselle.signer.timestamp.connector.TimeStampOperator in project signer by demoiselle.

the class TimestampGeneratorImpl method generateTimeStamp.

/**
 * Sends the time stamp request to a time stamp server
 *
 * @return The time stamp returned by the server
 */
@Override
public byte[] generateTimeStamp() throws CertificateCoreException {
    TimeStampOperator timeStampOperator = new TimeStampOperator();
    byte[] request = timeStampOperator.createRequest(privateKey, certificates, content, hash);
    return timeStampOperator.invoke(request);
}
Also used : TimeStampOperator(org.demoiselle.signer.timestamp.connector.TimeStampOperator)

Aggregations

TimeStampOperator (org.demoiselle.signer.timestamp.connector.TimeStampOperator)6 CertificateCoreException (org.demoiselle.signer.core.exception.CertificateCoreException)4 SignerException (org.demoiselle.signer.policy.impl.cades.SignerException)4 Timestamp (org.demoiselle.signer.timestamp.Timestamp)4 IOException (java.io.IOException)2 CMSException (org.bouncycastle.cms.CMSException)2 CMSSignedData (org.bouncycastle.cms.CMSSignedData)2 BouncyCastleProvider (org.bouncycastle.jce.provider.BouncyCastleProvider)2 TSPException (org.bouncycastle.tsp.TSPException)2 TimeStampToken (org.bouncycastle.tsp.TimeStampToken)2 SignedOrUnsignedAttribute (org.demoiselle.signer.policy.impl.cades.pkcs7.attribute.SignedOrUnsignedAttribute)2