Skip to content

Commit

Permalink
Fix #1275: Improve logging of verifyOfflineSignature (#1276)
Browse files Browse the repository at this point in the history
* Fix #1275: Improve logging of verifyOfflineSignature, validateToken, verifySignature, and verifyECDSASignature
  • Loading branch information
banterCZ authored Jan 26, 2024
1 parent e8ad760 commit b488c0b
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ public VerifySignatureResponse verifySignature(VerifySignatureRequest request) t
try {
logger.info("VerifySignatureRequest received, activation ID: {}", request.getActivationId());
final VerifySignatureResponse response = this.verifySignatureImplNonTransaction(request, new ArrayList<>());
logger.info("VerifySignatureRequest succeeded");
logger.info("VerifySignatureRequest succeeded, activation ID: {}, signature valid: {}", request.getActivationId(), response.isSignatureValid());
return response;
} catch (GenericServiceException ex) {
// already logged
Expand Down Expand Up @@ -517,7 +517,7 @@ public VerifyOfflineSignatureResponse verifyOfflineSignature(VerifyOfflineSignat
logger.info("VerifyOfflineSignatureRequest received, activation ID: {}", activationId);
final VerifyOfflineSignatureParameter parameter = convert(request, expectedComponentLength, allowedSignatureTypes, keyConvertor);
final VerifyOfflineSignatureResponse response = behavior.getOfflineSignatureServiceBehavior().verifyOfflineSignature(parameter);
logger.info("VerifyOfflineSignatureRequest succeeded");
logger.info("VerifyOfflineSignatureRequest succeeded, activation ID: {}, signature valid: {}", activationId, response.isSignatureValid());
return response;
} catch (GenericServiceException ex) {
// already logged
Expand Down Expand Up @@ -759,7 +759,7 @@ public VerifyECDSASignatureResponse verifyECDSASignature(VerifyECDSASignatureReq
final boolean matches = behavior.getAsymmetricSignatureServiceBehavior().verifyECDSASignature(activationId, signedData, signature, keyConvertor);
final VerifyECDSASignatureResponse response = new VerifyECDSASignatureResponse();
response.setSignatureValid(matches);
logger.info("VerifyECDSASignatureRequest succeeded");
logger.info("VerifyECDSASignatureRequest succeeded, activation ID: {}, signature valid: {}", activationId, response.isSignatureValid());
return response;
} catch (GenericServiceException ex) {
// already logged
Expand Down Expand Up @@ -1163,7 +1163,7 @@ public ValidateTokenResponse validateToken(ValidateTokenRequest request) throws
try {
logger.info("ValidateTokenRequest received, token ID: {}", request.getTokenId());
final ValidateTokenResponse response = behavior.getTokenBehavior().validateToken(request);
logger.info("ValidateTokenRequest succeeded");
logger.info("ValidateTokenRequest succeeded, token ID: {}, token valid: {}", request.getTokenId(), response.isTokenValid());
return response;
} catch (GenericServiceException ex) {
// already logged
Expand Down

0 comments on commit b488c0b

Please sign in to comment.