Certificate Trust Settings
is there any api that shows that Certificate 1 have full root access and Certificate 2 don't have full root access.
Thanks
is there any api that shows that Certificate 1 have full root access and Certificate 2 don't have full root access.
Thanks
in general, it's not possible to determine whether a certificate has full root access or not just by looking at the certificate itself or through an API. Certificates are used to establish trust between different entities and are issued by trusted authorities called Certificate Authorities (CAs). A certificate typically contains information about the entity it represents, such as its public key and identity information. It's the responsibility of the entity that uses the certificate to determine the level of access it has based on its own security policies and trust relationships.
In other words, the certificate itself doesn't determine the level of access. Rather, it's up to the entity that uses the certificate to determine the access level based on their own internal security policies and trust relationships
in general, it's not possible to determine whether a certificate has full root access or not just by looking at the certificate itself or through an API. Certificates are used to establish trust between different entities and are issued by trusted authorities called Certificate Authorities (CAs). A certificate typically contains information about the entity it represents, such as its public key and identity information. It's the responsibility of the entity that uses the certificate to determine the level of access it has based on its own security policies and trust relationships.
In other words, the certificate itself doesn't determine the level of access. Rather, it's up to the entity that uses the certificate to determine the access level based on their own internal security policies and trust relationships
More Information regarding my question.
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 have used the above code to check whether my RootCA is installed on user phone or not and I'm getting result. but I wanted to go one level above to check whether that RootCA have full access or not or that user have given my RootCA full access or not.
Thanks
I could be wrong, I don't know every specific information on every available API that available.
Certificate Trust Settings