Java 类org.bouncycastle.asn1.tsp.TimeStampResp 实例源码

项目:irma_future_id    文件:TimeStampResponseGenerator.java   
/**
 * Generate a TimeStampResponse with chosen status and FailInfoField.
 * 
 * @param status the PKIStatus to set.
 * @param failInfoField the FailInfoField to set.
 * @param statusString an optional string describing the failure.
 * @return a TimeStampResponse with a failInfoField and optional statusString
 * @throws TSPException in case the response could not be created
 */
public TimeStampResponse generateFailResponse(int status, int failInfoField, String statusString)
    throws TSPException
{
    this.status = status;

    this.setFailInfoField(failInfoField);

    if (statusString != null)
    {
        this.addStatusString(statusString);
    }

    PKIStatusInfo pkiStatusInfo = getPKIStatusInfo();

    TimeStampResp resp = new TimeStampResp(pkiStatusInfo, null);

    try
    {
        return new TimeStampResponse(resp);
    }
    catch (IOException e)
    {
        throw new TSPException("created badly formatted response!");
    }
}
项目:bc-java    文件:TimeStampResponseGenerator.java   
/**
 * Generate a TimeStampResponse with chosen status and FailInfoField.
 * 
 * @param status the PKIStatus to set.
 * @param failInfoField the FailInfoField to set.
 * @param statusString an optional string describing the failure.
 * @return a TimeStampResponse with a failInfoField and optional statusString
 * @throws TSPException in case the response could not be created
 */
public TimeStampResponse generateFailResponse(int status, int failInfoField, String statusString)
    throws TSPException
{
    this.status = status;

    this.setFailInfoField(failInfoField);

    if (statusString != null)
    {
        this.addStatusString(statusString);
    }

    PKIStatusInfo pkiStatusInfo = getPKIStatusInfo();

    TimeStampResp resp = new TimeStampResp(pkiStatusInfo, null);

    try
    {
        return new TimeStampResponse(resp);
    }
    catch (IOException e)
    {
        throw new TSPException("created badly formatted response!");
    }
}
项目:ipack    文件:TimeStampResponse.java   
public TimeStampResponse(TimeStampResp resp)
    throws TSPException, IOException
{
    this.resp = resp;

    if (resp.getTimeStampToken() != null)
    {
        timeStampToken = new TimeStampToken(resp.getTimeStampToken());
    }
}
项目:ipack    文件:TimeStampResponseGenerator.java   
/**
 * Generate a non-granted TimeStampResponse with chosen status and FailInfoField.
 * 
 * @param status the PKIStatus to set.
 * @param failInfoField the FailInfoField to set.
 * @param statusString an optional string describing the failure.
 * @return a TimeStampResponse with a failInfoField and optional statusString
 * @throws TSPException in case the response could not be created
 */
public TimeStampResponse generateFailResponse(int status, int failInfoField, String statusString)
    throws TSPException
{
    this.status = status;
    this.statusStrings = new ASN1EncodableVector();

    this.setFailInfoField(failInfoField);

    if (statusString != null)
    {
        this.addStatusString(statusString);
    }

    PKIStatusInfo pkiStatusInfo = getPKIStatusInfo();

    TimeStampResp resp = new TimeStampResp(pkiStatusInfo, null);

    try
    {
        return new TimeStampResponse(resp);
    }
    catch (IOException e)
    {
        throw new TSPException("created badly formatted response!");
    }
}
项目:gwt-crypto    文件:TimeStampResponse.java   
public TimeStampResponse(TimeStampResp resp)
    throws TSPException, IOException
{
    this.resp = resp;

    if (resp.getTimeStampToken() != null)
    {
        timeStampToken = new TimeStampToken(resp.getTimeStampToken());
    }
}
项目:gwt-crypto    文件:TimeStampResponseGenerator.java   
/**
 * Generate a non-granted TimeStampResponse with chosen status and FailInfoField.
 * 
 * @param status the PKIStatus to set.
 * @param failInfoField the FailInfoField to set.
 * @param statusString an optional string describing the failure.
 * @return a TimeStampResponse with a failInfoField and optional statusString
 * @throws TSPException in case the response could not be created
 */
public TimeStampResponse generateFailResponse(int status, int failInfoField, String statusString)
    throws TSPException
{
    this.status = status;
    this.statusStrings = new ASN1EncodableVector();

    this.setFailInfoField(failInfoField);

    if (statusString != null)
    {
        this.addStatusString(statusString);
    }

    PKIStatusInfo pkiStatusInfo = getPKIStatusInfo();

    TimeStampResp resp = new TimeStampResp(pkiStatusInfo, null);

    try
    {
        return new TimeStampResponse(resp);
    }
    catch (IOException e)
    {
        throw new TSPException("created badly formatted response!");
    }
}
项目:Aki-SSL    文件:TimeStampResponse.java   
public TimeStampResponse(TimeStampResp resp)
    throws TSPException, IOException
{
    this.resp = resp;

    if (resp.getTimeStampToken() != null)
    {
        timeStampToken = new TimeStampToken(resp.getTimeStampToken());
    }
}
项目:Aki-SSL    文件:TimeStampResponseGenerator.java   
/**
 * Generate a non-granted TimeStampResponse with chosen status and FailInfoField.
 * 
 * @param status the PKIStatus to set.
 * @param failInfoField the FailInfoField to set.
 * @param statusString an optional string describing the failure.
 * @return a TimeStampResponse with a failInfoField and optional statusString
 * @throws TSPException in case the response could not be created
 */
public TimeStampResponse generateFailResponse(int status, int failInfoField, String statusString)
    throws TSPException
{
    this.status = status;
    this.statusStrings = new ASN1EncodableVector();

    this.setFailInfoField(failInfoField);

    if (statusString != null)
    {
        this.addStatusString(statusString);
    }

    PKIStatusInfo pkiStatusInfo = getPKIStatusInfo();

    TimeStampResp resp = new TimeStampResp(pkiStatusInfo, null);

    try
    {
        return new TimeStampResponse(resp);
    }
    catch (IOException e)
    {
        throw new TSPException("created badly formatted response!");
    }
}
项目:irma_future_id    文件:TimeStampResponse.java   
public TimeStampResponse(TimeStampResp resp)
    throws TSPException, IOException
{
    this.resp = resp;

    if (resp.getTimeStampToken() != null)
    {
        timeStampToken = new TimeStampToken(resp.getTimeStampToken());
    }
}
项目:irma_future_id    文件:TimeStampResponseGenerator.java   
/**
 * Generate a non-granted TimeStampResponse with chosen status and FailInfoField.
 * 
 * @param status the PKIStatus to set.
 * @param failInfoField the FailInfoField to set.
 * @param statusString an optional string describing the failure.
 * @return a TimeStampResponse with a failInfoField and optional statusString
 * @throws TSPException in case the response could not be created
 */
public TimeStampResponse generateFailResponse(int status, int failInfoField, String statusString)
    throws TSPException
{
    this.status = status;
    this.statusStrings = new ASN1EncodableVector();

    this.setFailInfoField(failInfoField);

    if (statusString != null)
    {
        this.addStatusString(statusString);
    }

    PKIStatusInfo pkiStatusInfo = getPKIStatusInfo();

    TimeStampResp resp = new TimeStampResp(pkiStatusInfo, null);

    try
    {
        return new TimeStampResponse(resp);
    }
    catch (IOException e)
    {
        throw new TSPException("created badly formatted response!");
    }
}
项目:bc-java    文件:TimeStampResponse.java   
public TimeStampResponse(TimeStampResp resp)
    throws TSPException, IOException
{
    this.resp = resp;

    if (resp.getTimeStampToken() != null)
    {
        timeStampToken = new TimeStampToken(resp.getTimeStampToken());
    }
}
项目:bc-java    文件:TimeStampResponseGenerator.java   
/**
 * Generate a non-granted TimeStampResponse with chosen status and FailInfoField.
 * 
 * @param status the PKIStatus to set.
 * @param failInfoField the FailInfoField to set.
 * @param statusString an optional string describing the failure.
 * @return a TimeStampResponse with a failInfoField and optional statusString
 * @throws TSPException in case the response could not be created
 */
public TimeStampResponse generateFailResponse(int status, int failInfoField, String statusString)
    throws TSPException
{
    this.status = status;
    this.statusStrings = new ASN1EncodableVector();

    this.setFailInfoField(failInfoField);

    if (statusString != null)
    {
        this.addStatusString(statusString);
    }

    PKIStatusInfo pkiStatusInfo = getPKIStatusInfo();

    TimeStampResp resp = new TimeStampResp(pkiStatusInfo, null);

    try
    {
        return new TimeStampResponse(resp);
    }
    catch (IOException e)
    {
        throw new TSPException("created badly formatted response!");
    }
}