qsslsocket_shared_mac - fix a warning and compilation errors
SecTrustSettingsDomain is now (in the latest SDK) an enum, not a typedef for integer type. Change-Id: I1ad891190116cb27e10e38167fc15b4ee16a28f4 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
This commit is contained in:
parent
299358dcc5
commit
5d94b679de
@ -91,7 +91,7 @@ bool hasTrustedSslServerPolicy(SecPolicyRef policy, CFDictionaryRef props) {
|
||||
bool isCaCertificateTrusted(SecCertificateRef cfCert, int domain)
|
||||
{
|
||||
QCFType<CFArrayRef> cfTrustSettings;
|
||||
OSStatus status = SecTrustSettingsCopyTrustSettings(cfCert, domain, &cfTrustSettings);
|
||||
OSStatus status = SecTrustSettingsCopyTrustSettings(cfCert, SecTrustSettingsDomain(domain), &cfTrustSettings);
|
||||
if (status == noErr) {
|
||||
CFIndex size = CFArrayGetCount(cfTrustSettings);
|
||||
// if empty, trust for everything (as per the Security Framework documentation)
|
||||
@ -125,8 +125,8 @@ QList<QSslCertificate> QSslSocketPrivate::systemCaCertificates()
|
||||
QCFType<CFArrayRef> cfCerts;
|
||||
// iterate through all enum members, order:
|
||||
// kSecTrustSettingsDomainUser, kSecTrustSettingsDomainAdmin, kSecTrustSettingsDomainSystem
|
||||
for (int dom = kSecTrustSettingsDomainUser; dom <= kSecTrustSettingsDomainSystem; dom++) {
|
||||
OSStatus status = SecTrustSettingsCopyCertificates(dom, &cfCerts);
|
||||
for (int dom = kSecTrustSettingsDomainUser; dom <= int(kSecTrustSettingsDomainSystem); dom++) {
|
||||
OSStatus status = SecTrustSettingsCopyCertificates(SecTrustSettingsDomain(dom), &cfCerts);
|
||||
if (status == noErr) {
|
||||
const CFIndex size = CFArrayGetCount(cfCerts);
|
||||
for (CFIndex i = 0; i < size; ++i) {
|
||||
|
Loading…
Reference in New Issue
Block a user