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

Test quirks of HostnameVerifier #6353

Merged
merged 5 commits into from
Oct 31, 2020
Merged

Test quirks of HostnameVerifier #6353

merged 5 commits into from
Oct 31, 2020

Conversation

yschimke
Copy link
Collaborator

No description provided.

@yschimke
Copy link
Collaborator Author

The approval gives me nice warm fuzzies, but it's blocked to resolve what we think the behaviour should be. Or just assert the observed external behaviour since it is JSSE?

@swankjesse
Copy link
Collaborator

Should reject these in Certifikit? Lets change it to always return false if we see any non-ASCII characters? They shouldn’t be in the certificate and therefore we shouldn’t match if they’re in the hostname arg.

@yschimke yschimke merged commit 003bf4f into square:master Oct 31, 2020
*/
@Test @Ignore public void testWilcardNonAsciiSubjectAlt() throws Exception {
@Test public void testWilcardNonAsciiSubjectAlt() throws Exception {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@swankjesse I reactivated these tests as part of the change, are you ok with these?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep!

@yschimke
Copy link
Collaborator Author

Lets change it to always return false if we see any non-ASCII characters?

@swankjesse I've landed with this change, overall probably worth a quick post review for style.

Copy link
Collaborator

@swankjesse swankjesse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

*/
@Test @Ignore public void testWilcardNonAsciiSubjectAlt() throws Exception {
@Test public void testWilcardNonAsciiSubjectAlt() throws Exception {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep!

@yschimke yschimke deleted the quirkz branch November 8, 2020 15:24
yschimke added a commit to yschimke/okhttp that referenced this pull request Jul 4, 2021
* Test quirks of HostnameVerifier.
* Restrict successful results to ascii input.
yschimke added a commit that referenced this pull request Jul 4, 2021
* Use generated certificates in unit tests (#6346)

* Use generated certificates in unit tests
* Strict to ascii lowercase implementation

Co-authored-by: Jesse Wilson <jwilson@squareup.com>

* More restrictive behaviour of OkHostnameVerifier (#6353)

* Test quirks of HostnameVerifier.
* Restrict successful results to ascii input.

Co-authored-by: Jesse Wilson <jwilson@squareup.com>
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