Skip to content

HDDS-11030. Do not throw OperatorCreationException from CertificateApprover#sign#6843

Merged
dombizita merged 2 commits intoapache:masterfrom
fapifta:HDDS-11030
Jun 26, 2024
Merged

HDDS-11030. Do not throw OperatorCreationException from CertificateApprover#sign#6843
dombizita merged 2 commits intoapache:masterfrom
fapifta:HDDS-11030

Conversation

@fapifta
Copy link
Contributor

@fapifta fapifta commented Jun 21, 2024

What changes were proposed in this pull request?

The CertificateApprover interface is using OperatorCreationException from BouncyCastle as a signed exception thrown from DefaultApprover#sign method. In order to clean this BouncyCastle class from the generic interface, I removed it from the checked exceptions on the interface, and wrapped it into a generic CertificateException at DefaultApprover.

This is part of the effort to shrink down direct BouncyCastle dependencies to the minimum before moving things to the crypto modules.

What is the link to the Apache JIRA

https://issues.apache.org/jira/browse/HDDS-11030

How was this patch tested?

This is a fairly simple change, we do not have tests testing for this particular exception to be thrown though. I am reluctant to create one as of now, as this code has to be moved around, and we are planning to review the tests when the actual move is done.

Copy link
Contributor

@Galsza Galsza left a comment

Choose a reason for hiding this comment

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

@fapifta thank you for this change, looking good to me

Copy link
Contributor

@dombizita dombizita left a comment

Choose a reason for hiding this comment

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

Thanks for the patch @fapifta, looks good to me! Please resolve merge conflicts!

@fapifta
Copy link
Contributor Author

fapifta commented Jun 26, 2024

Thank you for the review @dombizita pending CI on conflict resolution.

@dombizita dombizita merged commit 08b1e3f into apache:master Jun 26, 2024
@dombizita
Copy link
Contributor

Thanks for working on this @fapifta! Thanks for the review @Galsza!

@fapifta
Copy link
Contributor Author

fapifta commented Jun 27, 2024

Thank you for the reviews and merging!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants