Changeset 58

Show
Ignore:
Timestamp:
06/25/05 15:41:55 (4 years ago)
Author:
bart
Message:

Working towards the 'only add key if unlocked keychain holds passphrase' option

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/Controller.m

    r41 r58  
    408408                [appleKeychainUnlockedLock unlock]; 
    409409 
    410                 status = SecKeychainFindGenericPassword(nil, strlen(serviceName), serviceName, strlen(accountName), accountName, &passwordLength, (void **)&kcPassword, nil); 
    411  
     410                if(!interaction) 
     411                { 
     412                        SecKeychainSetUserInteractionAllowed(NO); 
     413                        status = SecKeychainFindGenericPassword(nil, strlen(serviceName), serviceName, strlen(accountName), accountName, &passwordLength, (void **)&kcPassword, nil); 
     414                        SecKeychainSetUserInteractionAllowed(YES); 
     415                } 
     416                 
     417                else 
     418                { 
     419                        status = SecKeychainFindGenericPassword(nil, strlen(serviceName), serviceName, strlen(accountName), accountName, &passwordLength, (void **)&kcPassword, nil); 
     420                } 
     421                 
    412422                if(giveFocusBack) 
    413423                {