File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -16,21 +16,21 @@ package x509
16
16
#include <CoreFoundation/CoreFoundation.h>
17
17
#include <Security/Security.h>
18
18
19
- static bool isSSLPolicy(SecPolicyRef policyRef) {
19
+ static Boolean isSSLPolicy(SecPolicyRef policyRef) {
20
20
if (!policyRef) {
21
21
return false;
22
22
}
23
23
CFDictionaryRef properties = SecPolicyCopyProperties(policyRef);
24
24
if (properties == NULL) {
25
25
return false;
26
26
}
27
+ Boolean isSSL = false;
27
28
CFTypeRef value = NULL;
28
29
if (CFDictionaryGetValueIfPresent(properties, kSecPolicyOid, (const void **)&value)) {
29
- CFRelease(properties);
30
- return CFEqual(value, kSecPolicyAppleSSL);
30
+ isSSL = CFEqual(value, kSecPolicyAppleSSL);
31
31
}
32
32
CFRelease(properties);
33
- return false ;
33
+ return isSSL ;
34
34
}
35
35
36
36
// sslTrustSettingsResult obtains the final kSecTrustSettingsResult value
You can’t perform that action at this time.
0 commit comments