Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug2221818-ocsp-unknownCA-addendum #4538

Merged
merged 2 commits into from
Aug 11, 2023

Conversation

ladycfu
Copy link
Contributor

@ladycfu ladycfu commented Aug 10, 2023

a couple things:

  • respond with Unknown when CA can't find cert in its db
  • added safety net Exception to return Unknown
  • minor debug message when CA signs an object that's not a cert

fixes https://bugzilla.redhat.com/show_bug.cgi?id=2221818

a couple things:
- respond with Unknown when CA can't find cert in its db
- added safety net Exception to return Unknown
- minor debug message when CA signs an object that's not a cert

fixes https://bugzilla.redhat.com/show_bug.cgi?id=2221818
@ladycfu ladycfu requested a review from edewata August 10, 2023 23:47
Copy link
Contributor

@edewata edewata left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have some minor comments, but feel free to update or just merge.

} catch (EBaseException e) {
// internal error
logger.debug(name + e.toString());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is an internal error, I'd suggest that we generate a proper error log to help troubleshooting, something like this:

logger.error("Unable to retrieve certificate: " + e.getMessage(), e);

This statement will show a user friendly error message for the admin and a stack trace for developers.

Comment on lines 1854 to 1858
} catch (Exception e) {
// safety net
logger.debug(name + e.toString());
certStatus = new UnknownInfo();
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of adding another catch clause I think we can just replace the EBaseException with Exception in the previous clause.

minor adjustment for Exception and debug messages.
@ladycfu ladycfu merged commit 636c926 into dogtagpki:v10.13 Aug 11, 2023
57 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants