Skip to content

Commit

Permalink
Merge branch 'fix-blink-curl' into blink
Browse files Browse the repository at this point in the history
  • Loading branch information
yury committed Sep 9, 2021
2 parents 78de960 + c321c57 commit 1aa8b51
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 13 deletions.
12 changes: 6 additions & 6 deletions curl/curl/lib/ssh.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
// If we have Blinkshell, we use their key management:
#ifdef BLINKSHELL
#import "BKDefaults.h"
#import "BKHosts.h"
#import "BKPubKey.h"
#import <BlinkConfig/BKHosts.h>
#import <BlinkConfig/BKPubKey.h>
#endif

#ifdef HAVE_LIMITS_H
Expand Down Expand Up @@ -848,7 +848,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
// key associated with this hostname
if ((pk = [BKPubKey withID:[NSString stringWithUTF8String:data->set.str[STRING_SSH_PRIVATE_KEY]]]) != nil) {
publicKeyMemory = [pk.publicKey UTF8String];
privateKeyMemory = [pk.privateKey UTF8String];
privateKeyMemory = [[pk loadPrivateKey] UTF8String];
sshc->rsa = data->set.str[STRING_SSH_PRIVATE_KEY];
}
}
Expand All @@ -857,7 +857,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
if (host.key) {
if ((pk = [BKPubKey withID:host.key]) != nil) {
publicKeyMemory = [pk.publicKey UTF8String];
privateKeyMemory = [pk.privateKey UTF8String];
privateKeyMemory = [[pk loadPrivateKey] UTF8String];
sshc->rsa = strdup(host.key.UTF8String);
}
}
Expand All @@ -869,15 +869,15 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
// Priority 2: key named id_rsa:
if ((pk = [BKPubKey withID:@"id_rsa"]) != nil) {
publicKeyMemory = [pk.publicKey UTF8String];
privateKeyMemory = [pk.privateKey UTF8String];
privateKeyMemory = [[pk loadPrivateKey] UTF8String];
sshc->rsa = strdup("id_rsa");
}
}
if (!(privateKeyMemory && publicKeyMemory)) {
// Still no luck, try with id_dsa:
if ((pk = [BKPubKey withID:@"id_dsa"]) != nil) {
publicKeyMemory = [pk.publicKey UTF8String];
privateKeyMemory = [pk.privateKey UTF8String];
privateKeyMemory = [[pk loadPrivateKey] UTF8String];
sshc->rsa = strdup("id_dsa");
}
}
Expand Down
2 changes: 1 addition & 1 deletion curl/curl/lib/url.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ bool curl_win32_idn_to_ascii(const char *in, char **out);
// If we have Blinkshell, we use their key management:
#ifdef BLINKSHELL
#import "BKDefaults.h"
#import "BKHosts.h"
#import <BlinkConfig/BKHosts.h>
#endif

// from ios_error.h, but without the compileError:
Expand Down
1 change: 1 addition & 0 deletions curl/curl/src/tool_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@ static void main_free(struct GlobalConfig *config)
* scp localFile user@host:~/path/ => curl -T localFile scp://user@host/~/path/localFile
*/
#ifdef BLINKSHELL
__attribute__ ((visibility("default")))
int curl_static_main(int argc, char *argv[]);
#else
int curl_main(int argc, char *argv[]);
Expand Down
20 changes: 14 additions & 6 deletions curl_ios_static.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -356,8 +356,9 @@
2219E2CB1FD7E58600675252 /* tool_writeout.h in Headers */ = {isa = PBXBuildFile; fileRef = 2219E2681FD7E58600675252 /* tool_writeout.h */; };
2219E2CC1FD7E58600675252 /* tool_xattr.c in Sources */ = {isa = PBXBuildFile; fileRef = 2219E2691FD7E58600675252 /* tool_xattr.c */; };
2219E2CD1FD7E58600675252 /* tool_xattr.h in Headers */ = {isa = PBXBuildFile; fileRef = 2219E26A1FD7E58600675252 /* tool_xattr.h */; };
D271F98725B5B7DF005F88E5 /* openssl.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = D271F98525B5B7DF005F88E5 /* openssl.xcframework */; };
D271F98825B5B7DF005F88E5 /* libssh2.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = D271F98625B5B7DF005F88E5 /* libssh2.xcframework */; };
D224184D26EA0BD10078E35E /* BlinkConfig.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D224184C26EA0BD10078E35E /* BlinkConfig.framework */; };
D2D492BC25CD81E0007659F1 /* libssh2.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = D2D492BB25CD81D0007659F1 /* libssh2.xcframework */; };
D2D492C025CD81EA007659F1 /* openssl.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = D2D492BF25CD81EA007659F1 /* openssl.xcframework */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
Expand Down Expand Up @@ -713,17 +714,21 @@
2219E2681FD7E58600675252 /* tool_writeout.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tool_writeout.h; sourceTree = "<group>"; };
2219E2691FD7E58600675252 /* tool_xattr.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tool_xattr.c; sourceTree = "<group>"; };
2219E26A1FD7E58600675252 /* tool_xattr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tool_xattr.h; sourceTree = "<group>"; };
D224184C26EA0BD10078E35E /* BlinkConfig.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = BlinkConfig.framework; sourceTree = BUILT_PRODUCTS_DIR; };
D271F98525B5B7DF005F88E5 /* openssl.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = openssl.xcframework; path = xcfs/.build/artifacts/xcfs/openssl.xcframework; sourceTree = "<group>"; };
D271F98625B5B7DF005F88E5 /* libssh2.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = libssh2.xcframework; path = xcfs/.build/artifacts/xcfs/libssh2.xcframework; sourceTree = "<group>"; };
D2D492BB25CD81D0007659F1 /* libssh2.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = libssh2.xcframework; path = ../../xcfs/.build/artifacts/xcfs/libssh2.xcframework; sourceTree = "<group>"; };
D2D492BF25CD81EA007659F1 /* openssl.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = openssl.xcframework; path = ../../xcfs/.build/artifacts/xcfs/openssl.xcframework; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
2219DFCB1FD73AF500675252 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
D271F98725B5B7DF005F88E5 /* openssl.xcframework in Frameworks */,
D271F98825B5B7DF005F88E5 /* libssh2.xcframework in Frameworks */,
D2D492C025CD81EA007659F1 /* openssl.xcframework in Frameworks */,
D224184D26EA0BD10078E35E /* BlinkConfig.framework in Frameworks */,
D2D492BC25CD81E0007659F1 /* libssh2.xcframework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -1142,6 +1147,9 @@
2219E2D01FD7EDE600675252 /* Frameworks */ = {
isa = PBXGroup;
children = (
D224184C26EA0BD10078E35E /* BlinkConfig.framework */,
D2D492BF25CD81EA007659F1 /* openssl.xcframework */,
D2D492BB25CD81D0007659F1 /* libssh2.xcframework */,
D271F98625B5B7DF005F88E5 /* libssh2.xcframework */,
D271F98525B5B7DF005F88E5 /* openssl.xcframework */,
);
Expand Down Expand Up @@ -1728,7 +1736,7 @@
SKIP_INSTALL = YES;
STRIP_INSTALLED_PRODUCT = NO;
STRIP_STYLE = "non-global";
TARGETED_DEVICE_FAMILY = "1,2";
TARGETED_DEVICE_FAMILY = "1,2,6";
};
name = Debug;
};
Expand Down Expand Up @@ -1769,7 +1777,7 @@
SKIP_INSTALL = YES;
STRIP_INSTALLED_PRODUCT = NO;
STRIP_STYLE = "non-global";
TARGETED_DEVICE_FAMILY = "1,2";
TARGETED_DEVICE_FAMILY = "1,2,6";
};
name = Release;
};
Expand Down
Binary file removed file_cmds/.DS_Store
Binary file not shown.
Binary file removed less-34/.DS_Store
Binary file not shown.
Binary file removed text_cmds/.DS_Store
Binary file not shown.

0 comments on commit 1aa8b51

Please sign in to comment.