#include "SecureObjectSync/SOSCloudCircle.h"
#include "SecureObjectSync/SOSCloudCircleInternal.h"
#include "SecureObjectSync/SOSPeerInfo.h"
+#include "SecureObjectSync/SOSInternal.h"
#include <notify.h>
#include <sysexits.h>
#import "Applicant.h"
#include "utilities/SecCFRelease.h"
#include "utilities/debugging.h"
#include "utilities/SecAKSWrappers.h"
+#include "utilities/SecCFWrappers.h"
#import "CoreCDP/CDPFollowUpController.h"
#import "CoreCDP/CDPFollowUpContext.h"
// password path.
secnotice("cjr", "Couldn't process reject without password (e=%@) for %@ (will try with password next)", error, onScreen);
- if (CFErrorGetCode(error) == -536870174 && CFErrorGetDomain(error) == kSecKernDomain) {
+ if(CFErrorIsMalfunctioningKeybagError(error)){
secnotice("cjr", "system is locked, dismiss the notification");
processApplicantsAfterUnlock = true;
return;
}
-
static NSString *getLocalizedApplicationReminder() {
CFStringRef applicationReminder = NULL;
switch (MGGetSInt32Answer(kMGQDeviceClassNumber, MGDeviceClassInvalid)) {
}
NSDictionary *pendingAttributes = @{
- (id) kCFUserNotificationAlertHeaderKey : (__bridge NSString *) SecCopyCKString(SEC_CK_REMINDER_TITLE_IOS),
+ (id) kCFUserNotificationAlertHeaderKey : CFBridgingRelease(SecCopyCKString(SEC_CK_REMINDER_TITLE_IOS)),
(id) kCFUserNotificationAlertMessageKey : body,
- (id) kCFUserNotificationDefaultButtonTitleKey : (__bridge NSString *) SecCopyCKString(SEC_CK_REMINDER_BUTTON_OK),
- (id) kCFUserNotificationAlternateButtonTitleKey: has_iCSC ? (__bridge NSString *) SecCopyCKString(SEC_CK_REMINDER_BUTTON_ICSC) : @"",
+ (id) kCFUserNotificationDefaultButtonTitleKey : CFBridgingRelease(SecCopyCKString(SEC_CK_REMINDER_BUTTON_OK)),
+ (id) kCFUserNotificationAlternateButtonTitleKey: has_iCSC ? CFBridgingRelease(SecCopyCKString(SEC_CK_REMINDER_BUTTON_ICSC)) : @"",
(id) kCFUserNotificationAlertTopMostKey : @YES,
(__bridge id) SBUserNotificationDontDismissOnUnlock : @YES,
(__bridge id) SBUserNotificationDismissOnLock : @NO,
// Was: SEC_CK_CR_BODY_WITHDREW
// "... if you turn off a switch you have some idea why the light is off" - Murf
return;
- break;
case kSOSNeverAppliedToCircle:
// We didn't get kicked out, we were never here. This should only happen if we changed iCloud accounts
// (and we had sync on in the previous one, and never had it on in the new one). As this is explicit
// user action alot of the "Light switch" argument (above) applies.
return;
- break;
case kSOSPasswordChanged:
case kSOSNeverLeftCircle: