Skip to content

Conversation

@wangx0404
Copy link
Contributor

fix https handshake fail on Android platform.
An example error:

handshakeFailed(NIOSSL.BoringSSLError.sslError([Error: 268435581 error:1000007d:SSL routines:OPENSSL_internal:CERTIFICATE_VERIFY_FAILED at xxx/.build/checkouts/swift-nio-ssl/Sources/CNIOBoringSSL/ssl/handshake.cc:393]))

/// Some distributions do not ship CA directories: as such, it is not a problem if a distribution that is present in rootCAFileSearchPaths
/// is not present in this list.
private let rootCADirectorySearchPaths = [
"/system/etc/security/cacerts", // Android
Copy link
Contributor

Choose a reason for hiding this comment

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

@finagolfin does this path look appropriate to you? It's hard for me to validate this logic from here.

Copy link
Contributor

Choose a reason for hiding this comment

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

I have not done anything with this before, but it looks like the path is correct.

@wangx0404
Copy link
Contributor Author

from Android14, a new path is added for updating CA certificates. so I just updated the commit to read this new path first or else the older one.
refer:https://android.googlesource.com/platform/frameworks/base/+/8b192b19f264a8829eac2cfaf0b73f6fc188d933%5E%21/#F0

@Lukasa Lukasa added the 🔨 semver/patch No public API change. label Mar 26, 2024
@Lukasa
Copy link
Contributor

Lukasa commented Mar 26, 2024

@swift-server-bot test this please

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🔨 semver/patch No public API change.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants