You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If this is what we're going for, do you think that it would be better to write native code and then generate bindings of that (much like what we have for RedirectInterceptor and AsyncInputStreamReader) , rather than generating bindings for too many classes and then implementing it in Dart using JNI
Tests
What tests would be required to check if this is working correctly?
Setup a mock HTTPS Server with a CertificateChain and PrivateKey.
Then, setup valid and invalid certificates in the KeyStore and make requests from OkHttpClient?
Please see dart-lang/sdk#50669, it serves as a starting point for this feature implementation.
The Android KeyStore System prohibits the application from extracting key material.
This essentially prevents HTTP client users from supplying the
ByteArray
of Key Material into theSecurityContext
usingsetTrustedCertificatesBytes
However, since OkHttp can interact with native APIs, we can let the
OkHttpClient
use anSSLSocketFactory
and pass the Key Material usingjavax.net.ssl.X509TrustManager
Proposal
Expose a new API in
OkHttpClient
:See dart-lang/sdk#50669 (comment)
If this is what we're going for, do you think that it would be better to write native code and then generate bindings of that (much like what we have for
RedirectInterceptor
andAsyncInputStreamReader
) , rather than generating bindings for too many classes and then implementing it in Dart using JNITests
What tests would be required to check if this is working correctly?
Setup a mock HTTPS Server with a CertificateChain and PrivateKey.
Then, setup valid and invalid certificates in the
KeyStore
and make requests fromOkHttpClient
?cc @brianquinlan @camsim99
The text was updated successfully, but these errors were encountered: