podejo
1
Need help regarding whether my RootCA have full access or not in Certificate Trust Setting.
- I wanted to check whether my rootCA is installed on user phone
Certificate Trust Setting or not. which I'm able to do with piece of code.
let bundle = Bundle(for: type(of: self))
let rootCAName = "RootCA"
guard let filePath = bundle.path(forResource: rootCAName, ofType: "der"),
let data = try? Data(contentsOf: URL(fileURLWithPath: filePath)),
let certificate = SecCertificateCreateWithData(nil, data as CFData)
else {
return
}
// Check
var secTrust: SecTrust?
if SecTrustCreateWithCertificates(certificate, SecPolicyCreateBasicX509(), &secTrust) == errSecSuccess, let trust = secTrust {
SecTrustEvaluateAsyncWithError(trust, .global()) { trust, result, error in
print( "Cert => \(result ? "installed" : "not installed")")
}
}
- I wanted to know that user have given my
RootCA full access or not in Certificate Trust Setting. and I'm unable to find any api for that.
You can see in the image that one CA have full access and other not.
Anyone know any api or any source that can help me with this.
lukasa
(Cory Benfield)
2
This doesn't appear to be related to SwiftNIO. This question seems to be more about Apple's Security framework. That is best handled by asking your question on the Apple Developer Forums.
podejo
3
Thanks lukasa.
will do that now.
eskimo
(Quinn “The Eskimo!”)
4
will do that now.
Cool.
If you haven’t created your DevForums yet, please tag it with Security so that I see if. If you’ve already created it and didn’t tag it that way, send me the link.
Share and Enjoy
Quinn “The Eskimo!” @ DTS @ Apple
podejo
5
eskimo
(Quinn “The Eskimo!”)
6
You’ve asked your question on Apple Support Communities, run by Apple Support. Please repost on Apple Developer Forums, run by my group (Worldwide Developer Relations, of which DTS, Developer Technical Support, is a part).
Share and Enjoy
Quinn “The Eskimo!” @ DTS @ Apple
podejo
7
ok i'm doing it rightnow
i have posted and is being reviewed and will be published if approved.
podejo
8
1 Like
podejo
9
@eskimo can you check the thread again on apple developer forums.
thanks