diff --git a/certificates/install_darwin.go b/certificates/install_darwin.go index 1a8af859..6467c9ba 100644 --- a/certificates/install_darwin.go +++ b/certificates/install_darwin.go @@ -72,14 +72,7 @@ const char *uninstallCert() { OSStatus err = noErr; CFTypeRef itemList; err = SecItemCopyMatching((CFDictionaryRef)dict, &itemList); - if (err == noErr) { - err = SecItemDelete((CFDictionaryRef)dict); - if (err != noErr) { - NSString *errString = [@"Could not delete the certificates. Error: " stringByAppendingFormat:@"%d", err]; - NSLog(@"%@", errString); - return [errString cStringUsingEncoding:[NSString defaultCStringEncoding]];; - } - } else if (err != errSecItemNotFound){ + if (err != errSecItemNotFound){ NSString *errString = [@"Error: " stringByAppendingFormat:@"%d", err]; NSLog(@"%@", errString); return [errString cStringUsingEncoding:[NSString defaultCStringEncoding]];;