Skip to content

Conscrypt 2.5.0 upgrade#6228

Merged
yschimke merged 5 commits intosquare:masterfrom
yschimke:conscrypt_250
Aug 20, 2020
Merged

Conscrypt 2.5.0 upgrade#6228
yschimke merged 5 commits intosquare:masterfrom
yschimke:conscrypt_250

Conversation

@yschimke
Copy link
Copy Markdown
Collaborator

}
val x509TrustManager = trustManagers[0] as X509TrustManager
Conscrypt.setHostnameVerifier(x509TrustManager) { _, _ -> true }
Conscrypt.setHostnameVerifier(x509TrustManager) { _, _, _ -> true }
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

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)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

no longer necessary?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

It's the default as per the release notes

@yschimke
Copy link
Copy Markdown
Collaborator Author

cc @prbprbprb Can you take a look also

@yschimke
Copy link
Copy Markdown
Collaborator Author

return x509TrustManager
}

internal object DisabledHostnameVerifier : ConscryptHostnameVerifier {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

dig

@yschimke yschimke merged commit 504faef into square:master Aug 20, 2020
@yschimke yschimke deleted the conscrypt_250 branch November 8, 2020 15:26
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