Skip to content

Commit

Permalink
Use BlinkPaths to get known_host path
Browse files Browse the repository at this point in the history
  • Loading branch information
yury committed May 19, 2018
1 parent 49a2081 commit f5e4e0b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Sessions/SSHSession.m
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
#import "BKHosts.h"
#import "BKPubKey.h"
#import "SSHSession.h"
#import "BlinkPaths.h"

#define REQUEST_TTY_AUTO 0
#define REQUEST_TTY_NO 1
Expand Down Expand Up @@ -788,9 +789,9 @@ - (int)verify_host:(char *)addr
return -1;
}

NSURL *dd = [[[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask] firstObject];
NSURL *khURL = [dd URLByAppendingPathComponent:@"known_hosts"];
const char *khFilePath = [khURL.path UTF8String];
// NSURL *dd = [[[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask] firstObject];
// NSURL *khURL = [dd URLByAppendingPathComponent:@"known_hosts"];
const char *khFilePath = [BlinkPaths knownHosts].UTF8String;// [khURL.path UTF8String];

libssh2_knownhost_readfile(kh, khFilePath, LIBSSH2_KNOWNHOST_FILE_OPENSSH);

Expand Down

0 comments on commit f5e4e0b

Please sign in to comment.