org.bouncycastle.est.EnrollmentResponse Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bcpkix-fips Show documentation
Show all versions of bcpkix-fips Show documentation
The Bouncy Castle Java APIs for CMS, PKCS, EAC, TSP, CMP, CRMF, OCSP, and certificate generation. The APIs are designed primarily to be used in conjunction with the BC FIPS provider. The APIs may also be used with other providers although if being used in a FIPS context it is the responsibility of the user to ensure that any other providers used are FIPS certified.
package org.bouncycastle.est;
import org.bouncycastle.cert.X509CertificateHolder;
import org.bouncycastle.util.Store;
/**
* Holder class for a response containing the details making up a /simpleenroll response.
*/
public class EnrollmentResponse
{
private final Store store;
private final long notBefore;
private final ESTRequest requestToRetry;
private final Source source;
public EnrollmentResponse(Store store, long notBefore, ESTRequest requestToRetry, Source session)
{
this.store = store;
this.notBefore = notBefore;
this.requestToRetry = requestToRetry;
this.source = session;
}
public boolean canRetry()
{
return notBefore < System.currentTimeMillis();
}
public Store getStore()
{
return store;
}
public long getNotBefore()
{
return notBefore;
}
public ESTRequest getRequestToRetry()
{
return requestToRetry;
}
public Object getSession()
{
return source.getSession();
}
public Source getSource()
{
return source;
}
public boolean isCompleted()
{
return requestToRetry == null;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy