summaryrefslogtreecommitdiffstats
path: root/base/ocsp/src/com
diff options
context:
space:
mode:
authorEndi S. Dewata <edewata@redhat.com>2017-05-24 05:06:31 +0200
committerEndi S. Dewata <edewata@redhat.com>2017-05-24 18:54:20 +0200
commit9d74c8f2f6291e9bac433c950168d68fa5fc90c8 (patch)
tree9331dbb70bc1594f169b80ccd6cc0bd18d70033f /base/ocsp/src/com
parent7d39f6ecfe4c29c14948e4b5d30fde93d7f0f8e6 (diff)
downloadpki-9d74c8f2f6291e9bac433c950168d68fa5fc90c8.tar.gz
pki-9d74c8f2f6291e9bac433c950168d68fa5fc90c8.tar.xz
pki-9d74c8f2f6291e9bac433c950168d68fa5fc90c8.zip
Updated OCSP log messages.
Some log messages in OCSP-related code have been updated for clarity. https://pagure.io/dogtagpki/issue/2652 Change-Id: Ie81b95906a0d9aef6126fb205a4bcec028731e39
Diffstat (limited to 'base/ocsp/src/com')
-rw-r--r--base/ocsp/src/com/netscape/ocsp/OCSPAuthority.java10
1 files changed, 7 insertions, 3 deletions
diff --git a/base/ocsp/src/com/netscape/ocsp/OCSPAuthority.java b/base/ocsp/src/com/netscape/ocsp/OCSPAuthority.java
index 09b85b4d1..14dd33813 100644
--- a/base/ocsp/src/com/netscape/ocsp/OCSPAuthority.java
+++ b/base/ocsp/src/com/netscape/ocsp/OCSPAuthority.java
@@ -415,6 +415,7 @@ public class OCSPAuthority implements IOCSPAuthority, IOCSPService, ISubsystem,
*/
public BasicOCSPResponse sign(ResponseData rd)
throws EBaseException {
+
try (DerOutputStream out = new DerOutputStream()) {
DerOutputStream tmp = new DerOutputStream();
@@ -424,9 +425,11 @@ public class OCSPAuthority implements IOCSPAuthority, IOCSPService, ISubsystem,
if (rd_data != null) {
mTotalData += rd_data.length;
}
+
rd.encode(tmp);
AlgorithmId.get(algname).encode(tmp);
- CMS.debug("adding signature");
+
+ CMS.debug("OCSPAuthority: adding signature");
byte[] signature = mSigningUnit.sign(rd_data, algname);
tmp.putBitString(signature);
@@ -440,6 +443,7 @@ public class OCSPAuthority implements IOCSPAuthority, IOCSPService, ISubsystem,
for (int i = 0; i < chains.length; i++) {
tmpChain.putDerValue(new DerValue(chains[i].getEncoded()));
}
+
tmp1.write(DerValue.tag_Sequence, tmpChain);
tmp.write(DerValue.createTag(DerValue.TAG_CONTEXT, true, (byte) 0),
tmp1);
@@ -449,9 +453,9 @@ public class OCSPAuthority implements IOCSPAuthority, IOCSPService, ISubsystem,
BasicOCSPResponse response = new BasicOCSPResponse(out.toByteArray());
return response;
+
} catch (Exception e) {
- e.printStackTrace();
- // error e
+ CMS.debug(e);
log(ILogger.LL_FAILURE, CMS.getLogMessage("CMSCORE_OCSP_SIGN_RESPONSE", e.toString()));
return null;
}