Package org.bouncycastle.tsp

Examples of org.bouncycastle.tsp.TimeStampResponse


      throw new TimeStampException(e);
    }
  }

  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");
    }
    return response;
  }
View Full Code Here

TOP

Related Classes of org.bouncycastle.tsp.TimeStampResponse

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.