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

X509v3CertificateBuilder redundant CertIOException #1580

Open
kuzjka opened this issue Feb 8, 2024 · 0 comments
Open

X509v3CertificateBuilder redundant CertIOException #1580

kuzjka opened this issue Feb 8, 2024 · 0 comments
Assignees

Comments

@kuzjka
Copy link

kuzjka commented Feb 8, 2024

It looks like CertIOException in X509v3CertificateBuilder occurs if a certificate extension can not be constructed from the encoded value.
There is an override of addExtension method which receives already created Extension object. In this case, checked CertIOException is never thrown and should be removed from the method signature.

/**
* Add a given extension field for the standard extensions tag (tag 3).
*
* @param extension the full extension value.
* @return this builder object.
* @throws CertIOException if there is an issue with the new extension value.
* @throws IllegalArgumentException if the OID oid has already been used.
*/
public X509v3CertificateBuilder addExtension(
Extension extension)
throws CertIOException
{
extGenerator.addExtension(extension);
return this;
}

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 a pull request may close this issue.

2 participants