aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/crypto/x509/root_cgo_darwin.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/crypto/x509/root_cgo_darwin.go b/src/crypto/x509/root_cgo_darwin.go
index e6332072d6..1c20f26acb 100644
--- a/src/crypto/x509/root_cgo_darwin.go
+++ b/src/crypto/x509/root_cgo_darwin.go
@@ -16,7 +16,7 @@ package x509
#include <CoreFoundation/CoreFoundation.h>
#include <Security/Security.h>
-static bool isSSLPolicy(SecPolicyRef policyRef) {
+static Boolean isSSLPolicy(SecPolicyRef policyRef) {
if (!policyRef) {
return false;
}
@@ -24,13 +24,13 @@ static bool isSSLPolicy(SecPolicyRef policyRef) {
if (properties == NULL) {
return false;
}
+ Boolean isSSL = false;
CFTypeRef value = NULL;
if (CFDictionaryGetValueIfPresent(properties, kSecPolicyOid, (const void **)&value)) {
- CFRelease(properties);
- return CFEqual(value, kSecPolicyAppleSSL);
+ isSSL = CFEqual(value, kSecPolicyAppleSSL);
}
CFRelease(properties);
- return false;
+ return isSSL;
}
// sslTrustSettingsResult obtains the final kSecTrustSettingsResult value