Skip to content
Snippets Groups Projects
Commit e9a35730 authored by George Nachman's avatar George Nachman
Browse files

Adhoc build 3.0.20170124_215235

parent 4a07936e
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -6324,8 +6324,7 @@
LastUpgradeCheck = 0700;
TargetAttributes = {
874206460564169600CFC3F1 = {
DevelopmentTeam = H7V7XYVQ7D;
ProvisioningStyle = Automatic;
ProvisioningStyle = Manual;
};
A6755F481D729A0500F3726C = {
CreatedOnToolsVersion = 7.3.1;
Loading
Loading
@@ -7990,10 +7989,10 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_WARN_INT_CONVERSION = YES;
CODE_SIGN_IDENTITY = "Mac Developer";
CODE_SIGN_IDENTITY = "Developer ID Application: GEORGE NACHMAN (H7V7XYVQ7D)";
COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = YES;
DEVELOPMENT_TEAM = H7V7XYVQ7D;
DEVELOPMENT_TEAM = "";
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(SRCROOT)",
Loading
Loading
@@ -9249,11 +9248,11 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_WARN_INT_CONVERSION = YES;
CODE_SIGN_IDENTITY = "Mac Developer";
CODE_SIGN_IDENTITY = "Developer ID Application: GEORGE NACHMAN (H7V7XYVQ7D)";
COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
DEVELOPMENT_TEAM = H7V7XYVQ7D;
DEVELOPMENT_TEAM = "";
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(SRCROOT)",
Loading
Loading
@@ -9318,10 +9317,10 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_WARN_INT_CONVERSION = YES;
CODE_SIGN_IDENTITY = "Mac Developer";
CODE_SIGN_IDENTITY = "Developer ID Application: GEORGE NACHMAN (H7V7XYVQ7D)";
COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = YES;
DEVELOPMENT_TEAM = H7V7XYVQ7D;
DEVELOPMENT_TEAM = "";
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(SRCROOT)",
Loading
Loading
@@ -9384,9 +9383,9 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_WARN_INT_CONVERSION = YES;
CODE_SIGN_IDENTITY = "Mac Developer";
CODE_SIGN_IDENTITY = "Developer ID Application: GEORGE NACHMAN (H7V7XYVQ7D)";
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_TEAM = H7V7XYVQ7D;
DEVELOPMENT_TEAM = "";
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(SRCROOT)",
Loading
Loading
Loading
Loading
@@ -188,6 +188,7 @@ static NSError *SCPFileError(NSString *description) {
 
// This runs in a thread
- (NSArray *)configs {
ELog(@"Looking for ssh configs to use");
NSFileManager *fileManager = [NSFileManager defaultManager];
NSString *appSupport = [fileManager applicationSupportDirectory];
NSArray *paths = @[ [appSupport stringByAppendingPathComponent:@"ssh_config"] ?: @"",
Loading
Loading
@@ -197,12 +198,23 @@ static NSError *SCPFileError(NSString *description) {
NSMutableArray *configs = [NSMutableArray array];
for (NSString *path in paths) {
if (path.length == 0) {
DLog(@"Zero length path in configs paths %@", paths);
ELog(@"Zero length path in configs paths %@", paths);
continue;
}
ELog(@"Try host config file %@", path);
if ([fileManager fileExistsAtPath:path]) {
ELog(@"File exists");
NMSSHConfig *config = [NMSSHConfig configFromFile:path];
if (config) {
ELog(@"Parsed successfully");
for (NMSSHHostConfig *host in config.hostConfigs) {
ELog(@"patterns=%@ hostname=%@ user=%@ port=%@ identityFiles=%@",
host.hostPatterns,
host.hostname,
host.user,
host.port,
host.identityFiles);
}
[configs addObject:config];
} else {
ELog(@"Could not parse config file at %@", path);
Loading
Loading
@@ -293,10 +305,14 @@ static NSError *SCPFileError(NSString *description) {
 
BOOL didConnectToAgent = NO;
if (agentAllowed) {
ELog(@"Attempting to connect to ssh-agent");
[self.session connectToAgent];
// Check a private property to see if the connection to the agent was made.
if ([self.session respondsToSelector:@selector(agent)]) {
ELog(@"Sucessfully connected to ssh-agent");
didConnectToAgent = [self.session agent] != nil;
} else {
ELog(@"Failed to connect to ssh-agent");
}
}
 
Loading
Loading
@@ -306,6 +322,7 @@ static NSError *SCPFileError(NSString *description) {
authTypes = @[ @"password" ];
}
for (NSString *authType in authTypes) {
ELog(@"Consider auth type: %@", authType);
if (self.stopped) {
ELog(@"Break out of auth loop because stopped");
break;
Loading
Loading
@@ -315,6 +332,7 @@ static NSError *SCPFileError(NSString *description) {
break;
}
if ([authType isEqualToString:@"password"]) {
ELog(@"Prompting for password");
__block NSString *password;
dispatch_sync(dispatch_get_main_queue(), ^() {
password = [[FileTransferManager sharedInstance] transferrableFile:self
Loading
Loading
@@ -323,6 +341,7 @@ static NSError *SCPFileError(NSString *description) {
if (self.stopped || !password) {
break;
}
ELog(@"Performing password auth");
[self.session authenticateByPassword:password];
if (self.session.isAuthorized) {
break;
Loading
Loading
@@ -331,9 +350,11 @@ static NSError *SCPFileError(NSString *description) {
[self.session authenticateByKeyboardInteractiveUsingBlock:^NSString *(NSString *request) {
__block NSString *response;
dispatch_sync(dispatch_get_main_queue(), ^() {
ELog(@"Prompting for keyboard-interactive auth");
response = [[FileTransferManager sharedInstance] transferrableFile:self
keyboardInteractivePrompt:request];
});
ELog(@"Attempting keyboard interactive auth");
return response;
}];
if (self.stopped || self.session.isAuthorized) {
Loading
Loading
@@ -343,17 +364,20 @@ static NSError *SCPFileError(NSString *description) {
if (self.stopped) {
break;
}
ELog(@"Looking for an identity file.");
NSMutableArray *keyPaths = [NSMutableArray array];
if (self.session.hostConfig.identityFiles.count) {
ELog(@"Adding identity files for the current host config: %@", self.session.hostConfig.identityFiles);
[keyPaths addObjectsFromArray:self.session.hostConfig.identityFiles];
} else {
ELog(@"Adding default identity files in ~/.ssh");
[keyPaths addObjectsFromArray:@[ @"~/.ssh/id_rsa",
@"~/.ssh/id_dsa",
@"~/.ssh/id_ecdsa" ]];
}
NSFileManager *fileManager = [NSFileManager defaultManager];
for (NSString *keyPath in keyPaths) {
ELog(@"Looking for %@", keyPath);
keyPath = [self filenameByExpandingMetasyntaticVariables:keyPath];
if (![fileManager fileExistsAtPath:keyPath]) {
ELog(@"No key file at %@", keyPath);
Loading
Loading
@@ -361,6 +385,7 @@ static NSError *SCPFileError(NSString *description) {
}
__block NSString *password = nil;
if ([self privateKeyIsEncrypted:keyPath]) {
ELog(@"Found the identity file but the private key is encrypted. Prompting for password");
dispatch_sync(dispatch_get_main_queue(), ^() {
NSString *prompt =
[NSString stringWithFormat:@"passphrase for private key “%@”:",
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment