fix dependencies building, looks like i cant use the sim bc libs are compiled for ios

This commit is contained in:
neon443
2025-06-05 11:17:37 +01:00
parent 2a2ed76f58
commit 7d206478ea
92 changed files with 14342 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
#import <Foundation/Foundation.h>
@interface ConfigHelper : NSObject
/**
* Helper method to get a value from the configuration YAML.
*
* Assuming the values in the YAML file can be represented as NSDictionary, you
* can create a chain to get a deep value.
*
* Example:
*
* NSString *host = [ConfigHelper valueForKey:
* @"valid_password_protected_server.host"];
*/
+ (id)valueForKey:(NSString *)key;
@end

View File

@@ -0,0 +1,28 @@
#import "ConfigHelper.h"
#import <YAML/YAMLSerialization.h>
@implementation ConfigHelper
+ (id)valueForKey:(NSString *)key {
static id yaml;
if (!yaml) {
NSBundle *bundle = [NSBundle bundleForClass:[self class]];
NSString *path = [bundle pathForResource:@"config" ofType:@"yml"];
NSInputStream *stream = [[NSInputStream alloc] initWithFileAtPath:path];
yaml = [YAMLSerialization YAMLWithStream:stream
options:kYAMLReadOptionStringScalars
error:nil];
}
id data = [yaml objectAtIndex:0];
NSArray *keyList = [key componentsSeparatedByString:@"."];
for (NSString *keyPart in keyList) {
data = [data objectForKey:keyPart];
}
return data;
}
@end

View File

@@ -0,0 +1,47 @@
# Defines a valid, password protected server, and options for testing both
# valid and invalid user/password combinations as well as SCP to both a
# writable directory and one that is not writable by the user
valid_password_protected_server:
host: "127.0.0.1:22"
# User config
user: "user"
password: "password"
# Shell execution config
execute_command: "ls -1 /var/www/nmssh-tests/"
execute_expected_response: "invalid\nvalid\n"
# Directory config
writable_dir: "/var/www/nmssh-tests/valid/"
non_writable_dir: "/var/www/nmssh-tests/invalid/"
# Defines a valid, public key protected server, and options for testing both
# valid and invalid user/password combinations as well as SCP to both a
# writable directory and one that is not writable by the user
valid_public_key_protected_server:
host: "127.0.0.1:22"
# User config
user: "user"
# Public key path
valid_public_key: "~/.ssh/id_rsa.pub"
invalid_public_key: "~/.ssh/github_rsa.pub"
# Public key password
password: "password"
# Defines a valid server, that this computer can connect to via an agent.
valid_agent_server:
host: "127.0.0.1:22"
# User config
user: "user"
# Defines an invalid server and authentication credentials that are invalid for
# all defined test servers
invalid_server:
host: "0.0.0.0:22"
user: "user"
password: "pass"

View File

@@ -0,0 +1 @@
Versions/Current/Headers

View File

@@ -0,0 +1 @@
Versions/Current/Resources

View File

@@ -0,0 +1,58 @@
//
// YAMLSerialization.h
// YAML Serialization support by Mirek Rusin based on C library LibYAML by Kirill Simonov
// Released under MIT License
//
// Copyright 2010 Mirek Rusin
// Copyright 2010 Stanislav Yudin
//
#import <Foundation/Foundation.h>
#import "yaml.h"
// Mimics NSPropertyListMutabilityOptions
typedef enum {
kYAMLReadOptionImmutable = 0x0000000000000001,
kYAMLReadOptionMutableContainers = 0x0000000000000010,
kYAMLReadOptionMutableContainersAndLeaves = 0x0000000000000110,
kYAMLReadOptionStringScalars = 0x0000000000001000
} YAMLReadOptions;
typedef enum {
kYAMLErrorNoErrors,
kYAMLErrorCodeParserInitializationFailed,
kYAMLErrorCodeParseError,
kYAMLErrorCodeEmitterError,
kYAMLErrorInvalidOptions,
kYAMLErrorCodeOutOfMemory,
kYAMLErrorInvalidYamlObject,
} YAMLErrorCode;
typedef enum {
kYAMLWriteOptionSingleDocument = 0x0000000000000001,
kYAMLWriteOptionMultipleDocuments = 0x0000000000000010,
} YAMLWriteOptions;
extern NSString *const YAMLErrorDomain;
@interface YAMLSerialization : NSObject {
}
+ (void) writeYAML: (id) yaml
toStream: (NSOutputStream *) stream
options: (YAMLWriteOptions) opt
error: (NSError **) error;
+ (NSData *) dataFromYAML: (id) yaml
options: (YAMLWriteOptions) opt
error: (NSError **) error;
+ (NSMutableArray *) YAMLWithStream: (NSInputStream *) stream
options: (YAMLReadOptions) opt
error: (NSError **) error;
+ (NSMutableArray *) YAMLWithData: (NSData *) data
options: (YAMLReadOptions) opt
error: (NSError **) error;
@end

View File

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>11E53</string>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>YAML</string>
<key>CFBundleIdentifier</key>
<string>com.yourcompany.YAML</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>YAML</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>DTCompiler</key>
<string></string>
<key>DTPlatformBuild</key>
<string>4E3002</string>
<key>DTPlatformVersion</key>
<string>GM</string>
<key>DTSDKBuild</key>
<string>11E53</string>
<key>DTSDKName</key>
<string></string>
<key>DTXcode</key>
<string>0433</string>
<key>DTXcodeBuild</key>
<string>4E3002</string>
</dict>
</plist>

View File

Binary file not shown.

View File

@@ -0,0 +1 @@
A

View File

@@ -0,0 +1 @@
Versions/Current/YAML