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

Clarify the Certificate is not trusted Error. #286

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dopry
Copy link

@dopry dopry commented Aug 9, 2015

I was working with the library and ran into the 'Certificate is not trusted Error'.There was a CN mismatch, but not being familiar with the library I was unsure what this error message meant or why the certificate was not trusted. After some debugging I discovered it was a subject mismatch and a matching certificate was not found in the caStore.

This PR modified the error message to identify the possible issues to a consumer.

I'm not very satisfied with the error message. It represents two possible error cases and is much longer than the other error conditions. It would be nice to separate DER validation from the caStore.hasCertificate method, so this error messaged could be more concise.

I cannot pursue refactoring hasCertificate at the moment, so I am proposing just updating the error message for now. If the changes would be welcome open an issue and assign it to me. I'll try to get around to it when time allows.

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.

1 participant