apple / swift-nio-ssl

TLS Support for SwiftNIO, based on BoringSSL.
https://swiftpackageindex.com/apple/swift-nio-ssl/main/documentation/niossl
Apache License 2.0
392 stars 140 forks source link

fix https fail on Android #453

Closed wangx0404 closed 6 months ago

wangx0404 commented 9 months ago

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]))

wangx0404 commented 9 months ago

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 commented 6 months ago

@swift-server-bot test this please