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

bc-java 1.75 fails to parse (admittedly invalid) certificates that used to be parseable #1508

Open
pjsg opened this issue Oct 16, 2023 · 2 comments

Comments

@pjsg
Copy link

pjsg commented Oct 16, 2023

We use bc-java to parse certificates but 1.75 fails to parse some invalid certificates (which are mostly valid). Ideally bc would return more information about the failure rather than just throw an IllegalArgumentException.

Suggest that a subclass of IllegalArgumentException be thrown with more information about why the certificate was invalid.

I can make this change.....

@dghgit
Copy link
Contributor

dghgit commented Oct 17, 2023

Yes, if you would like to submit a pull request, I'd be happy to look at it. Curious to know what the errors are, I'm guessing they may be about malformed integers?

@pjsg
Copy link
Author

pjsg commented Oct 19, 2023

I stuck up a WIP PR: #1511 which is the functional code that implements the change. I haven't added tests for the changes yet (the actual tests that I have been using are in our private repo which makes use of BC). If this approach seems reasonable, then I'll go ahead and do that.

Some of the issues are malformed integers, but there are others as well -- invalid version numbers etc.

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

No branches or pull requests

2 participants