| 394 | | else |
|---|
| 395 | | { |
|---|
| 396 | | if([question hasSuffix:@"'s password: "]) |
|---|
| 397 | | { |
|---|
| 398 | | consultKeychain = [[NSUserDefaults standardUserDefaults] boolForKey:AddInteractivePasswordString]; |
|---|
| 399 | | accountName = [[[question componentsSeparatedByString:@"'s"] objectAtIndex:0] UTF8String]; |
|---|
| 400 | | } |
|---|
| 401 | | |
|---|
| 402 | | else |
|---|
| 403 | | { |
|---|
| 404 | | if([question hasPrefix:@"The authenticity of host"]) |
|---|
| 405 | | { |
|---|
| 406 | | [passphraseIsRequestedLock lock]; |
|---|
| 407 | | passphraseIsRequested = NO; |
|---|
| 408 | | [passphraseIsRequestedLock unlock]; |
|---|
| 409 | | |
|---|
| 410 | | if(interaction) |
|---|
| 411 | | { |
|---|
| 412 | | int r = NSRunAlertPanel(local(@"UnknownHostKey"), question, local(@"No"), local(@"Yes"), nil); |
|---|
| 413 | | NSString *response = ( r == NSAlertAlternateReturn) ? @"yes" : @"no"; |
|---|
| 414 | | return response; |
|---|
| 415 | | } |
|---|
| 416 | | |
|---|
| 417 | | else |
|---|
| 418 | | { |
|---|
| 419 | | return @"no"; |
|---|
| 420 | | } |
|---|
| 421 | | } |
|---|
| 422 | | } |
|---|
| 423 | | } |
|---|
| | 393 | else if ([question hasSuffix:@"'s password: "]) |
|---|
| | 394 | { |
|---|
| | 395 | consultKeychain = [[NSUserDefaults standardUserDefaults] boolForKey:AddInteractivePasswordString]; |
|---|
| | 396 | accountName = [[[question componentsSeparatedByString:@"'s"] objectAtIndex:0] UTF8String]; |
|---|
| | 397 | } |
|---|
| | 398 | |
|---|
| | 399 | else if ([question hasPrefix:@"The authenticity of host"]) |
|---|
| | 400 | { |
|---|
| | 401 | [passphraseIsRequestedLock lock]; |
|---|
| | 402 | passphraseIsRequested = NO; |
|---|
| | 403 | [passphraseIsRequestedLock unlock]; |
|---|
| | 404 | |
|---|
| | 405 | if (! interaction) |
|---|
| | 406 | return @"no"; |
|---|
| | 407 | |
|---|
| | 408 | int r = NSRunAlertPanel(local(@"UnknownHostKey"), question, local(@"No"), local(@"Yes"), nil); |
|---|
| | 409 | NSString *response = ( r == NSAlertAlternateReturn) ? @"yes" : @"no"; |
|---|
| | 410 | return response; |
|---|
| | 411 | } |
|---|