-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Android and iOS support #3
Comments
Any updates on this? |
Nope -- but if you're willing to contribute I'm happy to provide any guidance you need. |
TBH, I was planning on it because of paritytech/subxt#563. However, using |
Android and iOS are both supported by https://github.com/rustls/rustls-platform-verifier Is there user demand for a native-certs solution or should we suggest users consider using the platform verifier instead? That crate isn't quite ready for primetime but I also suspect we can get it ready sooner than we could add support for those platforms here. |
iOS support might be as easy as enabling the security-framework path for But in general, the rustls-platform-verifier is probably a better alternative for most use cases. |
rustls-platform-verifier has been released and is probably a better option in most cases. |
Do you think it will be reasonable to works on this issue first, enabling the usage of |
Happy to review a PR for this but want to caution that if this needs too much complexity we might want to avoid it in favor of improving the platform verifier crate instead. If you want to contribute, maybe you can contribute there? |
Yes, hopefully I have some bandwidth to contribute here. Do you have any guidance on how things should be done? Maybe we can talk about it on the |
@stormshield-gt happy to discuss on Discord. |
I would suggest, first, that this issue is asking for almost entirely unrelated things. iOS: AFAIK this is not possible -- the macOS APIs we use aren't available on iOS. But I'm not an iOS expert, and could well be wrong. The linked code in the OP is not doing the job that is required here; it is using the system verifier rather than extracting the trusted certs. Android: ditto, the linked code above is not what is needed for this crate. However, I am pretty sure there will be a way via the android keystore service & |
As soon as we get to that level of complexity, it seems like we'd almost certainly be better off relying on the context/build infra/testing we already have in place in the rustls-platform-verifier repo. |
Thanks a lot for the guidance. By checking things by my side, I reached to the same conclusion. It seems like everybody agree that it would be better to look for supporting extra roots inside |
On the android side I just came across this in golang: https://github.com/golang/go/blob/master/src/crypto/x509/root_linux.go#L26-L30 |
For IOS, they used to embed the cert store statically and then switch to using the platform verifier golang/go@b74f2ef. That seems to confirm there is no API for loading the store on this platform |
This seems like it could be reasonably adapted to this crate, but I echo @djc's concerns that when you start to consider test coverage for Android it would ratchet up the complexity of this repo's CI more than I think is deserved. Given there's no good solution for iOS I suspect most users invested in a "native" experience that includes mobile platforms will want to use |
(There was some follow-up in rustls/rustls-platform-verifier#58 (comment).) |
I think we can look at how chromium is implemented.
https://github.com/chromium/chromium/blob/master/net/cert/cert_verify_proc_android.cc
https://github.com/chromium/chromium/blob/master/net/cert/cert_verify_proc_ios.cc
The text was updated successfully, but these errors were encountered: