aboutsummaryrefslogtreecommitdiff
path: root/lib/vtls
diff options
context:
space:
mode:
authorDaniel Gustafsson <daniel@hobbit.se>2016-09-06 10:37:31 +0200
committerDaniel Stenberg <daniel@haxx.se>2016-09-06 10:37:31 +0200
commit022dbdb8ac07379fa9cc2cbb3eba503b7f77a6ed (patch)
treeffa18b36229a054ac77849034425d3d3ec411317 /lib/vtls
parent8331b08d228697eec15c99162d8bae5a9ca1ef05 (diff)
darwinssl: test for errSecSuccess in PKCS12 import rather than noErr (#993)
While noErr and errSecSuccess are defined as the same value, the API documentation states that SecPKCS12Import() returns errSecSuccess if there were no errors in importing. Ensure that a future change of the defined value doesn't break (however unlikely) and be consistent with the API docs.
Diffstat (limited to 'lib/vtls')
-rw-r--r--lib/vtls/darwinssl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/vtls/darwinssl.c b/lib/vtls/darwinssl.c
index ebb9e307e..90119dd50 100644
--- a/lib/vtls/darwinssl.c
+++ b/lib/vtls/darwinssl.c
@@ -955,7 +955,7 @@ static OSStatus CopyIdentityFromPKCS12File(const char *cPath,
/* Here we go: */
status = SecPKCS12Import(pkcs_data, options, &items);
- if(status == noErr && items && CFArrayGetCount(items)) {
+ if(status == errSecSuccess && items && CFArrayGetCount(items)) {
CFDictionaryRef identity_and_trust = CFArrayGetValueAtIndex(items, 0L);
const void *temp_identity = CFDictionaryGetValue(identity_and_trust,
kSecImportItemIdentity);