Examples of PKIFailureInfo


Examples of org.bouncycastle.asn1.cmp.PKIFailureInfo

            // Handle the TSA response
            TimeStampResponse response = new TimeStampResponse(respBytes);
           
            // validate communication level attributes (RFC 3161 PKIStatus)
            response.validate(request);
            PKIFailureInfo failure = response.getFailInfo();
            int value = (failure == null) ? 0 : failure.intValue();
            if (value != 0) {
                // @todo: Translate value of 15 error codes defined by PKIFailureInfo to string
                throw new IOException(MessageLocalization.getComposedMessage("invalid.tsa.1.response.code.2", tsaURL, String.valueOf(value)));
            }
            // @todo: validate the time stap certificate chain (if we want
View Full Code Here

Examples of org.bouncycastle.asn1.cmp.PKIFailureInfo

            // Handle the TSA response
            TimeStampResponse response = new TimeStampResponse(respBytes);
           
            // validate communication level attributes (RFC 3161 PKIStatus)
            response.validate(request);
            PKIFailureInfo failure = response.getFailInfo();
            int value = (failure == null) ? 0 : failure.intValue();
            if (value != 0) {
                // @todo: Translate value of 15 error codes defined by PKIFailureInfo to string
                throw new IOException(MessageLocalization.getComposedMessage("invalid.tsa.1.response.code.2", tsaURL, String.valueOf(value)));
            }
            // @todo: validate the time stap certificate chain (if we want
View Full Code Here

Examples of org.bouncycastle.asn1.cmp.PKIFailureInfo

  protected TimeStampResponse getTimeStampResponse(final TimeStampRequest request, final byte[] responseBytes) throws IOException, TSPException {
    TimeStampResponse response = new TimeStampResponse(responseBytes);

    response.validate(request);
    PKIFailureInfo failure = response.getFailInfo();

    if ((failure != null) && (failure.intValue() != 0)) {
      throw new IllegalStateException("Failure Status " + failure.intValue());
    }

    TimeStampToken timeStampToken = response.getTimeStampToken();
    if (timeStampToken == null) {
      throw new IllegalStateException("TimeStampToken not found in response");
View Full Code Here

Examples of org.bouncycastle.asn1.cmp.PKIFailureInfo

        timeStampResponse.validate(request);

        if (0 != timeStampResponse.getStatus()) {
            LOG.log(POILogger.DEBUG, "status: " + timeStampResponse.getStatus());
            LOG.log(POILogger.DEBUG, "status string: " + timeStampResponse.getStatusString());
            PKIFailureInfo failInfo = timeStampResponse.getFailInfo();
            if (null != failInfo) {
                LOG.log(POILogger.DEBUG, "fail info int value: " + failInfo.intValue());
                if (/*PKIFailureInfo.unacceptedPolicy*/(1 << 8) == failInfo.intValue()) {
                    LOG.log(POILogger.DEBUG, "unaccepted policy");
                }
            }
            throw new RuntimeException("timestamp response status != 0: "
                    + timeStampResponse.getStatus());
View Full Code Here

Examples of org.bouncycastle.asn1.cmp.PKIFailureInfo

  protected TimeStampResponse getTimeStampResponse(final TimeStampRequest request, final byte[] responseBytes) throws IOException, TSPException {
    TimeStampResponse response = new TimeStampResponse(responseBytes);

    response.validate(request);
    PKIFailureInfo failure = response.getFailInfo();

    if ((failure != null) && (failure.intValue() != 0)) {
      throw new IllegalStateException("Failure Status " + failure.intValue());
    }

    TimeStampToken timeStampToken = response.getTimeStampToken();
    if (timeStampToken == null) {
      throw new IllegalStateException("TimeStampToken not found in response");
View Full Code Here

Examples of org.bouncycastle.asn1.cmp.PKIFailureInfo

  protected TimeStampResponse getTimeStampResponse(final TimeStampRequest request, final byte[] responseBytes) throws IOException, TSPException {
    TimeStampResponse response = new TimeStampResponse(responseBytes);

    response.validate(request);
    PKIFailureInfo failure = response.getFailInfo();

    if ((failure != null) && (failure.intValue() != 0)) {
      throw new IllegalStateException("Failure Status " + failure.intValue());
    }

    TimeStampToken timeStampToken = response.getTimeStampToken();
    if (timeStampToken == null) {
      throw new IllegalStateException("TimeStampToken not found in response");
View Full Code Here

Examples of org.bouncycastle.asn1.cmp.PKIFailureInfo

  protected TimeStampResponse getTimeStampResponse(final TimeStampRequest request, final byte[] responseBytes) throws IOException, TSPException {
    TimeStampResponse response = new TimeStampResponse(responseBytes);

    response.validate(request);
    PKIFailureInfo failure = response.getFailInfo();

    if ((failure != null) && (failure.intValue() != 0)) {
      throw new IllegalStateException("Failure Status " + failure.intValue());
    }

    TimeStampToken timeStampToken = response.getTimeStampToken();
    if (timeStampToken == null) {
      throw new IllegalStateException("TimeStampToken not found in response");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.