Thanks to visit codestin.com
Credit goes to github.com

Skip to content

netops: return GIT_ECERTIFICATE when it fails the basic tests #2680

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

Merged
merged 1 commit into from
Nov 3, 2014

Conversation

carlosmn
Copy link
Member

@carlosmn carlosmn commented Nov 2, 2014

When we first ask OpenSSL to verify the certfiicate itself (rather
than the HTTPS specifics), we should also return
GIT_ECERTIFICATE. Otherwise, the caller would consider this as a failed
operation rather than a failed validation and not call the user's own
validation.


We really need to figure out the creation of a test CA and certs and http-hosting repos so we can automatically test this.

When we first ask OpenSSL to verify the certfiicate itself (rather
than the HTTPS specifics), we should also return
GIT_ECERTIFICATE. Otherwise, the caller would consider this as a failed
operation rather than a failed validation and not call the user's own
validation.
@ethomson
Copy link
Member

ethomson commented Nov 3, 2014

Nice. This seems correct enough to merge as-is without updating the unit tests to have a test that fails here.

@ethomson
Copy link
Member

ethomson commented Nov 3, 2014

Though I'm curious if you're thinking of scripting OpenSSL or if you're going to drop some invalid cert into the test resources?

ethomson added a commit that referenced this pull request Nov 3, 2014
netops: return GIT_ECERTIFICATE when it fails the basic tests
@ethomson ethomson merged commit 873eb89 into master Nov 3, 2014
@carlosmn
Copy link
Member Author

carlosmn commented Nov 3, 2014

I was thinking of scripting some CA and cert-creation scripts. I suppose we could create them once and have them as fixtures, but then we'd probably just forget how to create them if we decide we have more edge cases, so I would really like it if we could copy-paste-modify when adding new tests.

@carlosmn carlosmn deleted the cmn/invalid-cert-return branch November 3, 2014 14:03
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