Reputation: 1457
I am not using native implementations of TLS validations, I need to use my own. For this validation, I would like to fetch a list of trusted certificates from the OS, containing both the certificates that are trusted by default by iOS and certificates the user has manually installed in his iPhone's settings.
There are alternatives, as for example fetching this list from somewhere else, including it hardcoded in the app or giving the option for the user to import this list before using the app for any TLS validation. However, the best option regarding the use cases of the app would be to fetch those directly from the OS. Is it possible? How can I do it in Swift?
Upvotes: 1
Views: 1168
Reputation: 266
You can't get the certificate list itself programmatically, you can only get a Trust object, which doesn't give you access to the certificates.
Source: https://developer.apple.com/forums/thread/92038?answerId=277986022#277986022
Upvotes: 2