summaryrefslogtreecommitdiffstats
path: root/base/util/src
diff options
context:
space:
mode:
authorEndi S. Dewata <edewata@redhat.com>2017-05-23 22:25:32 +0200
committerEndi S. Dewata <edewata@redhat.com>2017-05-23 22:25:32 +0200
commitfd149624a7ace41c75c5034345503c0d412f7aa3 (patch)
tree728601b3fa3cb88931035a7b145a176f64cb7f90 /base/util/src
parent6dd0800d8bb24d9d2d3f9e377a90f641612c7c78 (diff)
downloadpki-fd149624a7ace41c75c5034345503c0d412f7aa3.tar.gz
pki-fd149624a7ace41c75c5034345503c0d412f7aa3.tar.xz
pki-fd149624a7ace41c75c5034345503c0d412f7aa3.zip
Updated log messages in OCSPProcessor.
The OCSPProcessor has been modified to log the OCSP response to help troubleshooting. https://pagure.io/dogtagpki/issue/2695 Change-Id: I9c880def083221af26cac902ff6d7852d0555a8f
Diffstat (limited to 'base/util/src')
-rw-r--r--base/util/src/com/netscape/cmsutil/ocsp/OCSPProcessor.java14
1 files changed, 11 insertions, 3 deletions
diff --git a/base/util/src/com/netscape/cmsutil/ocsp/OCSPProcessor.java b/base/util/src/com/netscape/cmsutil/ocsp/OCSPProcessor.java
index 3b721304c..c7a40f77d 100644
--- a/base/util/src/com/netscape/cmsutil/ocsp/OCSPProcessor.java
+++ b/base/util/src/com/netscape/cmsutil/ocsp/OCSPProcessor.java
@@ -134,8 +134,8 @@ public class OCSPProcessor {
byte[] requestData = os.toByteArray();
if (verbose) {
- System.out.println("Data Length: " + requestData.length);
- System.out.println("Data: " + Utils.base64encode(requestData));
+ System.out.println("Request Length: " + requestData.length);
+ System.out.println("Request: " + Utils.base64encode(requestData));
}
ByteArrayEntity requestEntity = new ByteArrayEntity(requestData);
@@ -156,8 +156,16 @@ public class OCSPProcessor {
}
// construct OCSP response
+
+ byte[] responseData = buffer.toByteArray();
+
+ if (verbose) {
+ System.out.println("Response Length: " + responseData.length);
+ System.out.println("Response: " + Utils.base64encode(responseData));
+ }
+
return (OCSPResponse)OCSPResponse.getTemplate().decode(
- new ByteArrayInputStream(buffer.toByteArray()));
+ new ByteArrayInputStream(responseData));
} finally {
EntityUtils.consume(responseEntity);