Merged
Conversation
swankjesse
reviewed
Aug 19, 2020
| } | ||
| val x509TrustManager = trustManagers[0] as X509TrustManager | ||
| Conscrypt.setHostnameVerifier(x509TrustManager) { _, _ -> true } | ||
| Conscrypt.setHostnameVerifier(x509TrustManager) { _, _, _ -> true } |
Collaborator
There was a problem hiding this comment.
I think you can make this work with both versions if you’re careful. Implement an interface in a class that defines both the old and the new method, and apply override on only one of the two methods. At runtime things should just work.
| return newSSLContext().apply { | ||
| init(null, arrayOf<TrustManager>(trustManager), null) | ||
| }.socketFactory.also { | ||
| Conscrypt.setUseEngineSocket(it, true) |
Collaborator
Author
There was a problem hiding this comment.
It's the default as per the release notes
Collaborator
Author
|
cc @prbprbprb Can you take a look also |
Collaborator
Author
|
Tests in CI will kick on on landing e.g. https://app.circleci.com/pipelines/github/square/okhttp/3688/workflows/aebd8a95-ef1c-4229-94a2-a1377b2600a6/jobs/16159 |
swankjesse
approved these changes
Aug 20, 2020
| return x509TrustManager | ||
| } | ||
|
|
||
| internal object DisabledHostnameVerifier : ConscryptHostnameVerifier { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
New release unfortunately changes the ConscryptHostnameVerifier interface
https://groups.google.com/d/msgid/conscrypt/fe34caac-4cdb-4e64-b877-ea8cd0ca8b64n%40googlegroups.com?utm_medium=email&utm_source=footer
google/conscrypt#877