-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
advancedtls: add fine-grained verification levels in XXXOptions #3454
Conversation
7074f60
to
ff1bdaf
Compare
@cesarghali Could you please take a look at this when you have time? Thanks in advance! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the PR Zhen. Maybe I'm missing something but my main concern is that we're providing a security library with a way to completely disable it (using SkipVerification
), is that intended?
Yes, that's intended. You can find an equivalent part in C core as well. The only difference is that in C core that |
3b74ce9
to
f55a59d
Compare
@cesarghali all the comments are resolved/replied. Could you please take a second look? |
@cesarghali Hi, just want to let you know that this is ready for review :-) it would be good if you could take a look these days. Thanks😊 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with one nit.
@easwars |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly nits.
40de5a7
to
ef3388a
Compare
ef3388a
to
886b230
Compare
@easwars Thanks for the review! Now all comments fixed. It would be great if you could take a look again, :-) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really sorry for having you reformat all comments. I only wanted to make changes to the comments that you had touched in this PR. Anyways, thank you for that.
I think I have only a couple of minor nits. Other than that, PR looks good to me.
@easwars No worries at all! It's my pleasure to improve the overall code quality:-) |
The main purpose of this PR is to set a new enum field
VerificationAuthType
for users to choose their own verification levels. Users could have three levels of verification: certificate and hostname check, certificate check only, and no check. The reasons for this change is:Note that with this change, we are able to provide better custom verification checks, both on client side and server side. Before, this feature is called "custom server authorization check", and only available on client side. Now since we also give server side the ability to choose "skip all verifications", server side also needs some "custom verification mechanism", so I changed the verification mechanism to apply to both sides, and updated the comments accordingly.
In sum, there should be no "custom server authorization check" any more, but instead "custom verification check".
I also added some unit tests and a new integration test for the newly added/changed behaviors.