Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing a crash related to the OpenSSL library #646

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
92 changes: 38 additions & 54 deletions Moonlight.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 54;
objectVersion = 48;
objects = {

/* Begin PBXBuildFile section */
Expand Down Expand Up @@ -32,7 +32,6 @@
98882A0E2AF60FA300C5A11C /* libavutil.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 98882A092AF60F9000C5A11C /* libavutil.a */; };
988FCD41293B091B003050E2 /* KeyboardInputField.m in Sources */ = {isa = PBXBuildFile; fileRef = 988FCD40293B091B003050E2 /* KeyboardInputField.m */; };
988FCD42293B091B003050E2 /* KeyboardInputField.m in Sources */ = {isa = PBXBuildFile; fileRef = 988FCD40293B091B003050E2 /* KeyboardInputField.m */; };
9890CF6B203B7EE1006C4B06 /* libxml2.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 9890CF6A203B7EE1006C4B06 /* libxml2.tbd */; };
9896219723D15C7000211983 /* X1Kit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9896219623D15C7000211983 /* X1Kit.swift */; };
9896219A23D56E8100211983 /* X1Kit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9896219623D15C7000211983 /* X1Kit.swift */; };
9897B6A1221260EF00966419 /* Controller.m in Sources */ = {isa = PBXBuildFile; fileRef = 9897B6A0221260EF00966419 /* Controller.m */; };
Expand All @@ -42,8 +41,6 @@
98D5856D1C0EA79600F6CC00 /* TemporaryHost.m in Sources */ = {isa = PBXBuildFile; fileRef = 98D5856C1C0EA79600F6CC00 /* TemporaryHost.m */; };
98D585701C0ED0E800F6CC00 /* TemporarySettings.m in Sources */ = {isa = PBXBuildFile; fileRef = 98D5856F1C0ED0E800F6CC00 /* TemporarySettings.m */; };
DC1F5A07206436B20037755F /* ConnectionHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = DC1F5A06206436B20037755F /* ConnectionHelper.m */; };
F74BEF9C2C1A705600224667 /* OpenSSL in Frameworks */ = {isa = PBXBuildFile; productRef = F74BEF9B2C1A705600224667 /* OpenSSL */; };
F74BEFA42C1A80E400224667 /* OpenSSL in Frameworks */ = {isa = PBXBuildFile; productRef = F74BEFA32C1A80E400224667 /* OpenSSL */; };
FB1A674D2131E65900507771 /* KeyboardSupport.m in Sources */ = {isa = PBXBuildFile; fileRef = FB1A674C2131E65900507771 /* KeyboardSupport.m */; };
FB1A67602132419700507771 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = FB1A675E2132419700507771 /* Main.storyboard */; };
FB1A67622132419A00507771 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = FB1A67612132419A00507771 /* Assets.xcassets */; };
Expand Down Expand Up @@ -81,7 +78,6 @@
FB1A67E32132498A00507771 /* Limelight.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = FB290D0519B2C406004C83CF /* Limelight.xcdatamodeld */; };
FB1A67E521324A1F00507771 /* CoreData.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FB1A67E421324A1F00507771 /* CoreData.framework */; };
FB1A67E821324DE300507771 /* libopus.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FB8946EA19F6AFB800339C8A /* libopus.a */; };
FB1A67EA21324DF300507771 /* libxml2.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = FB1A67E921324DF300507771 /* libxml2.tbd */; };
FB1A6819213284FB00507771 /* UIComputerView.m in Sources */ = {isa = PBXBuildFile; fileRef = FBDE86DF19F7A837001C18A8 /* UIComputerView.m */; };
FB1A681A213284FB00507771 /* UIAppView.m in Sources */ = {isa = PBXBuildFile; fileRef = FBDE86E519F82297001C18A8 /* UIAppView.m */; };
FB1A681B213284FB00507771 /* ComputerScrollView.m in Sources */ = {isa = PBXBuildFile; fileRef = FB1D59961BBCCB6400F482CA /* ComputerScrollView.m */; };
Expand Down Expand Up @@ -331,8 +327,6 @@
9865DC3C2132922E0005B9B9 /* GameController.framework in Frameworks */,
98882A0D2AF60FA000C5A11C /* libavformat.a in Frameworks */,
98882A0E2AF60FA300C5A11C /* libavutil.a in Frameworks */,
F74BEFA42C1A80E400224667 /* OpenSSL in Frameworks */,
FB1A67EA21324DF300507771 /* libxml2.tbd in Frameworks */,
FB1A67E821324DE300507771 /* libopus.a in Frameworks */,
98181BEB2791278F00E43572 /* libSDL2.a in Frameworks */,
FB1A67E521324A1F00507771 /* CoreData.framework in Frameworks */,
Expand All @@ -345,14 +339,12 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
9890CF6B203B7EE1006C4B06 /* libxml2.tbd in Frameworks */,
98CFB82F1CAD481B0048EF74 /* libmoonlight-common.a in Frameworks */,
FB8946ED19F6AFE800339C8A /* libopus.a in Frameworks */,
98882A082AF60F7400C5A11C /* libavutil.a in Frameworks */,
FB290CF419B2C406004C83CF /* CoreGraphics.framework in Frameworks */,
FB290CF819B2C406004C83CF /* CoreData.framework in Frameworks */,
98181BED2791281100E43572 /* CoreMotion.framework in Frameworks */,
F74BEF9C2C1A705600224667 /* OpenSSL in Frameworks */,
98882A072AF60F7200C5A11C /* libavformat.a in Frameworks */,
FB290CF619B2C406004C83CF /* UIKit.framework in Frameworks */,
FB290CF219B2C406004C83CF /* Foundation.framework in Frameworks */,
Expand Down Expand Up @@ -703,7 +695,6 @@
);
name = "Moonlight TV";
packageProductDependencies = (
F74BEFA32C1A80E400224667 /* OpenSSL */,
);
productName = "Moonlight TV";
productReference = FB1A67532132419700507771 /* Moonlight TV.app */;
Expand All @@ -724,7 +715,6 @@
);
name = Moonlight;
packageProductDependencies = (
F74BEF9B2C1A705600224667 /* OpenSSL */,
);
productName = Limelight;
productReference = FB290CEE19B2C406004C83CF /* Moonlight.app */;
Expand Down Expand Up @@ -765,7 +755,6 @@
);
mainGroup = FB290CE519B2C406004C83CF;
packageReferences = (
F74BEF9A2C1A705600224667 /* XCRemoteSwiftPackageReference "OpenSSL-Package" */,
);
productRefGroup = FB290CEF19B2C406004C83CF /* Products */;
projectDirPath = "";
Expand Down Expand Up @@ -996,24 +985,29 @@
);
INFOPLIST_FILE = "Moonlight TV/Info.plist";
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.games";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
"LIBRARY_SEARCH_PATHS[sdk=appletvos*]" = (
"$(inherited)",
"$(PROJECT_DIR)/libs/opus/lib/tvOS",
"$(PROJECT_DIR)/libs/SDL2/lib/tvOS",
"$(PROJECT_DIR)/libs/FFmpeg/lib/tvOS",
"$(PROJECT_DIR)/libs/OpenSSL/lib/appletvos",
);
"LIBRARY_SEARCH_PATHS[sdk=appletvsimulator*]" = (
"$(inherited)",
"$(PROJECT_DIR)/libs/opus/lib/tvOS-Sim",
"$(PROJECT_DIR)/libs/SDL2/lib/tvOS-Sim",
"$(PROJECT_DIR)/libs/FFmpeg/lib/tvOS-Sim",
"$(PROJECT_DIR)/libs/OpenSSL/lib/appletvsimulator",
);
MARKETING_VERSION = 9.0.2;
MTL_ENABLE_DEBUG_INFO = YES;
OTHER_LDFLAGS = (
"$(inherited)",
"-lxml2",
"-lcrypto",
"-lssl",
);
PRODUCT_BUNDLE_IDENTIFIER = "com.moonlight-stream.Moonlight";
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = appletvos;
Expand Down Expand Up @@ -1052,24 +1046,29 @@
);
INFOPLIST_FILE = "Moonlight TV/Info.plist";
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.games";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
"LIBRARY_SEARCH_PATHS[sdk=appletvos*]" = (
"$(inherited)",
"$(PROJECT_DIR)/libs/opus/lib/tvOS",
"$(PROJECT_DIR)/libs/SDL2/lib/tvOS",
"$(PROJECT_DIR)/libs/FFmpeg/lib/tvOS",
"$(PROJECT_DIR)/libs/OpenSSL/lib/appletvos",
);
"LIBRARY_SEARCH_PATHS[sdk=appletvsimulator*]" = (
"$(inherited)",
"$(PROJECT_DIR)/libs/opus/lib/tvOS-Sim",
"$(PROJECT_DIR)/libs/SDL2/lib/tvOS-Sim",
"$(PROJECT_DIR)/libs/FFmpeg/lib/tvOS-Sim",
"$(PROJECT_DIR)/libs/OpenSSL/lib/appletvsimulator",
);
MARKETING_VERSION = 9.0.2;
MTL_ENABLE_DEBUG_INFO = NO;
OTHER_LDFLAGS = (
"$(inherited)",
"-lxml2",
"-lcrypto",
"-lssl",
);
PRODUCT_BUNDLE_IDENTIFIER = "com.moonlight-stream.Moonlight";
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = appletvos;
Expand Down Expand Up @@ -1212,24 +1211,29 @@
);
INFOPLIST_FILE = "Limelight/Limelight-Info.plist";
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.games";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
"LIBRARY_SEARCH_PATHS[sdk=iphoneos*]" = (
"$(inherited)",
"$(PROJECT_DIR)/libs/opus/lib/iOS",
"$(PROJECT_DIR)/libs/SDL2/lib/iOS",
"$(PROJECT_DIR)/libs/FFmpeg/lib/iOS",
"$(PROJECT_DIR)/libs/OpenSSL/lib/iphoneos",
);
"LIBRARY_SEARCH_PATHS[sdk=iphonesimulator*]" = (
"$(inherited)",
"$(PROJECT_DIR)/libs/opus/lib/iOS-Sim",
"$(PROJECT_DIR)/libs/SDL2/lib/iOS-Sim",
"$(PROJECT_DIR)/libs/FFmpeg/lib/iOS-Sim",
"$(PROJECT_DIR)/libs/OpenSSL/lib/iphonesimulator",
);
MARKETING_VERSION = 9.0.2;
PRODUCT_BUNDLE_IDENTIFIER = "com.moonlight-stream.Moonlight";
OTHER_LDFLAGS = (
"$(inherited)",
"-lxml2",
"-lcrypto",
"-lssl",
);
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "";
SKIP_INSTALL = NO;
Expand Down Expand Up @@ -1262,31 +1266,35 @@
);
INFOPLIST_FILE = "Limelight/Limelight-Info.plist";
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.games";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
"LIBRARY_SEARCH_PATHS[sdk=iphoneos*]" = (
"$(inherited)",
"$(PROJECT_DIR)/libs/opus/lib/iOS",
"$(PROJECT_DIR)/libs/SDL2/lib/iOS",
"$(PROJECT_DIR)/libs/FFmpeg/lib/iOS",
"$(PROJECT_DIR)/libs/OpenSSL/lib/iphoneos",
);
"LIBRARY_SEARCH_PATHS[sdk=iphonesimulator*]" = (
"$(inherited)",
"$(PROJECT_DIR)/libs/opus/lib/iOS-Sim",
"$(PROJECT_DIR)/libs/SDL2/lib/iOS-Sim",
"$(PROJECT_DIR)/libs/FFmpeg/lib/iOS-Sim",
"$(PROJECT_DIR)/libs/OpenSSL/lib/iphonesimulator",
);
MARKETING_VERSION = 9.0.2;
PRODUCT_BUNDLE_IDENTIFIER = "com.moonlight-stream.Moonlight";
OTHER_LDFLAGS = (
"$(inherited)",
"-lxml2",
"-lcrypto",
"-lssl",
);
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "";
SKIP_INSTALL = NO;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OBJC_BRIDGING_HEADER = "Limelight/Input/Moonlight-Bridging-Header.h";
SWIFT_OBJC_INTERFACE_HEADER_NAME = "Moonlight-Swift.h";
SWIFT_OPTIMIZATION_LEVEL = "-O";
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 5.0;
WRAPPER_EXTENSION = app;
Expand Down Expand Up @@ -1325,30 +1333,6 @@
};
/* End XCConfigurationList section */

/* Begin XCRemoteSwiftPackageReference section */
F74BEF9A2C1A705600224667 /* XCRemoteSwiftPackageReference "OpenSSL-Package" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/krzyzanowskim/OpenSSL-Package.git";
requirement = {
kind = upToNextMajorVersion;
minimumVersion = 3.1.5004;
};
};
/* End XCRemoteSwiftPackageReference section */

/* Begin XCSwiftPackageProductDependency section */
F74BEF9B2C1A705600224667 /* OpenSSL */ = {
isa = XCSwiftPackageProductDependency;
package = F74BEF9A2C1A705600224667 /* XCRemoteSwiftPackageReference "OpenSSL-Package" */;
productName = OpenSSL;
};
F74BEFA32C1A80E400224667 /* OpenSSL */ = {
isa = XCSwiftPackageProductDependency;
package = F74BEF9A2C1A705600224667 /* XCRemoteSwiftPackageReference "OpenSSL-Package" */;
productName = OpenSSL;
};
/* End XCSwiftPackageProductDependency section */

/* Begin XCVersionGroup section */
FB290D0519B2C406004C83CF /* Limelight.xcdatamodeld */ = {
isa = XCVersionGroup;
Expand Down

This file was deleted.

111 changes: 111 additions & 0 deletions libs/OpenSSL/include/openssl/aes.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
/*
* Copyright 2002-2020 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the Apache License 2.0 (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
* in the file LICENSE in the source distribution or at
* https://www.openssl.org/source/license.html
*/

#ifndef OPENSSL_AES_H
# define OPENSSL_AES_H
# pragma once

#include <OpenSSL/macros.h>
# ifndef OPENSSL_NO_DEPRECATED_3_0
# define HEADER_AES_H
# endif

#include <OpenSSL/opensslconf.h>

# include <stddef.h>
# ifdef __cplusplus
extern "C" {
# endif

# define AES_BLOCK_SIZE 16

# ifndef OPENSSL_NO_DEPRECATED_3_0

# define AES_ENCRYPT 1
# define AES_DECRYPT 0

# define AES_MAXNR 14


/* This should be a hidden type, but EVP requires that the size be known */
struct aes_key_st {
# ifdef AES_LONG
unsigned long rd_key[4 * (AES_MAXNR + 1)];
# else
unsigned int rd_key[4 * (AES_MAXNR + 1)];
# endif
int rounds;
};
typedef struct aes_key_st AES_KEY;

# endif
# ifndef OPENSSL_NO_DEPRECATED_3_0
OSSL_DEPRECATEDIN_3_0 const char *AES_options(void);
OSSL_DEPRECATEDIN_3_0
int AES_set_encrypt_key(const unsigned char *userKey, const int bits,
AES_KEY *key);
OSSL_DEPRECATEDIN_3_0
int AES_set_decrypt_key(const unsigned char *userKey, const int bits,
AES_KEY *key);
OSSL_DEPRECATEDIN_3_0
void AES_encrypt(const unsigned char *in, unsigned char *out,
const AES_KEY *key);
OSSL_DEPRECATEDIN_3_0
void AES_decrypt(const unsigned char *in, unsigned char *out,
const AES_KEY *key);
OSSL_DEPRECATEDIN_3_0
void AES_ecb_encrypt(const unsigned char *in, unsigned char *out,
const AES_KEY *key, const int enc);
OSSL_DEPRECATEDIN_3_0
void AES_cbc_encrypt(const unsigned char *in, unsigned char *out,
size_t length, const AES_KEY *key,
unsigned char *ivec, const int enc);
OSSL_DEPRECATEDIN_3_0
void AES_cfb128_encrypt(const unsigned char *in, unsigned char *out,
size_t length, const AES_KEY *key,
unsigned char *ivec, int *num, const int enc);
OSSL_DEPRECATEDIN_3_0
void AES_cfb1_encrypt(const unsigned char *in, unsigned char *out,
size_t length, const AES_KEY *key,
unsigned char *ivec, int *num, const int enc);
OSSL_DEPRECATEDIN_3_0
void AES_cfb8_encrypt(const unsigned char *in, unsigned char *out,
size_t length, const AES_KEY *key,
unsigned char *ivec, int *num, const int enc);
OSSL_DEPRECATEDIN_3_0
void AES_ofb128_encrypt(const unsigned char *in, unsigned char *out,
size_t length, const AES_KEY *key,
unsigned char *ivec, int *num);

/* NB: the IV is _two_ blocks long */
OSSL_DEPRECATEDIN_3_0
void AES_ige_encrypt(const unsigned char *in, unsigned char *out,
size_t length, const AES_KEY *key,
unsigned char *ivec, const int enc);
/* NB: the IV is _four_ blocks long */
OSSL_DEPRECATEDIN_3_0
void AES_bi_ige_encrypt(const unsigned char *in, unsigned char *out,
size_t length, const AES_KEY *key, const AES_KEY *key2,
const unsigned char *ivec, const int enc);
OSSL_DEPRECATEDIN_3_0
int AES_wrap_key(AES_KEY *key, const unsigned char *iv,
unsigned char *out, const unsigned char *in,
unsigned int inlen);
OSSL_DEPRECATEDIN_3_0
int AES_unwrap_key(AES_KEY *key, const unsigned char *iv,
unsigned char *out, const unsigned char *in,
unsigned int inlen);
# endif


# ifdef __cplusplus
}
# endif

#endif
Loading