Skip to content

Commit 9ecca66

Browse files
committedNov 27, 2019
Xcode 11 support, Remove OpenSSL 1.0.2 support, Migrate to Swift 5
1 parent 82b6d98 commit 9ecca66

File tree

22 files changed

+194
-259
lines changed

22 files changed

+194
-259
lines changed
 

‎OpenSSL-for-iOS.xcodeproj/project.pbxproj

+74-23
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
archiveVersion = 1;
44
classes = {
55
};
6-
objectVersion = 46;
6+
objectVersion = 52;
77
objects = {
88

99
/* Begin PBXBuildFile section */
@@ -271,8 +271,8 @@
271271
533ED2F21528C4840005C6FA /* Project object */ = {
272272
isa = PBXProject;
273273
attributes = {
274-
LastUpgradeCheck = 0800;
275-
ORGANIZATIONNAME = Immobilienscout24;
274+
LastUpgradeCheck = 1120;
275+
ORGANIZATIONNAME = "Felix Schulze";
276276
TargetAttributes = {
277277
2A8A9A6E1BFA59F7002944B4 = {
278278
CreatedOnToolsVersion = 7.1.1;
@@ -288,8 +288,8 @@
288288
};
289289
};
290290
buildConfigurationList = 533ED2F51528C4840005C6FA /* Build configuration list for PBXProject "OpenSSL-for-iOS" */;
291-
compatibilityVersion = "Xcode 3.2";
292-
developmentRegion = English;
291+
compatibilityVersion = "Xcode 11.0";
292+
developmentRegion = en;
293293
hasScannedForEncodings = 0;
294294
knownRegions = (
295295
en,
@@ -349,7 +349,7 @@
349349
);
350350
runOnlyForDeploymentPostprocessing = 0;
351351
shellPath = /bin/sh;
352-
shellScript = "if [ ! -f lib/libcrypto.a ]; then\n echo \"error: Please run ./build-libssl.h first\"\n exit 1\nfi";
352+
shellScript = "if [ ! -f lib/libcrypto.a ]; then\n echo \"error: Please run ./build-libssl.h first\"\n exit 1\nfi\n";
353353
showEnvVarsInLog = 0;
354354
};
355355
/* End PBXShellScriptBuildPhase section */
@@ -419,19 +419,24 @@
419419
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
420420
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
421421
INFOPLIST_FILE = "OpenSSL-for-tvOS/Info.plist";
422-
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
422+
LD_RUNPATH_SEARCH_PATHS = (
423+
"$(inherited)",
424+
"@executable_path/Frameworks",
425+
);
423426
LIBRARY_SEARCH_PATHS = (
424427
"$(inherited)",
425428
"$(PROJECT_DIR)/lib",
426429
);
430+
MARKETING_VERSION = 5.0;
427431
MTL_ENABLE_DEBUG_INFO = YES;
428432
PRODUCT_BUNDLE_IDENTIFIER = "de.felixschulze.OpenSSL-for-tvOS";
429433
PRODUCT_NAME = "$(TARGET_NAME)";
430434
SDKROOT = appletvos;
431435
SWIFT_OBJC_BRIDGING_HEADER = "OpenSSL-for-iOS/OpenSSL-for-iOS-Bridging-Header.h";
432-
SWIFT_VERSION = 3.0;
436+
SWIFT_VERSION = 5.0;
433437
TARGETED_DEVICE_FAMILY = 3;
434-
TVOS_DEPLOYMENT_TARGET = 9.0;
438+
TVOS_DEPLOYMENT_TARGET = 12.0;
439+
WATCHOS_DEPLOYMENT_TARGET = 6.0;
435440
};
436441
name = Debug;
437442
};
@@ -451,33 +456,47 @@
451456
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
452457
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
453458
INFOPLIST_FILE = "OpenSSL-for-tvOS/Info.plist";
454-
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
459+
LD_RUNPATH_SEARCH_PATHS = (
460+
"$(inherited)",
461+
"@executable_path/Frameworks",
462+
);
455463
LIBRARY_SEARCH_PATHS = (
456464
"$(inherited)",
457465
"$(PROJECT_DIR)/lib",
458466
);
467+
MARKETING_VERSION = 5.0;
459468
MTL_ENABLE_DEBUG_INFO = NO;
460469
PRODUCT_BUNDLE_IDENTIFIER = "de.felixschulze.OpenSSL-for-tvOS";
461470
PRODUCT_NAME = "$(TARGET_NAME)";
462471
SDKROOT = appletvos;
463472
SWIFT_OBJC_BRIDGING_HEADER = "OpenSSL-for-iOS/OpenSSL-for-iOS-Bridging-Header.h";
464-
SWIFT_VERSION = 3.0;
473+
SWIFT_VERSION = 5.0;
465474
TARGETED_DEVICE_FAMILY = 3;
466-
TVOS_DEPLOYMENT_TARGET = 9.0;
475+
TVOS_DEPLOYMENT_TARGET = 12.0;
476+
WATCHOS_DEPLOYMENT_TARGET = 6.0;
467477
};
468478
name = Release;
469479
};
470480
533ED31A1528C4840005C6FA /* Debug */ = {
471481
isa = XCBuildConfiguration;
472482
buildSettings = {
473483
ALWAYS_SEARCH_USER_PATHS = NO;
484+
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
474485
CLANG_ENABLE_OBJC_ARC = YES;
486+
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
475487
CLANG_WARN_BOOL_CONVERSION = YES;
488+
CLANG_WARN_COMMA = YES;
476489
CLANG_WARN_CONSTANT_CONVERSION = YES;
490+
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
477491
CLANG_WARN_EMPTY_BODY = YES;
478492
CLANG_WARN_ENUM_CONVERSION = YES;
479493
CLANG_WARN_INFINITE_RECURSION = YES;
480494
CLANG_WARN_INT_CONVERSION = YES;
495+
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
496+
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
497+
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
498+
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
499+
CLANG_WARN_STRICT_PROTOTYPES = YES;
481500
CLANG_WARN_SUSPICIOUS_MOVE = YES;
482501
CLANG_WARN_UNREACHABLE_CODE = YES;
483502
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
@@ -502,25 +521,35 @@
502521
GCC_WARN_UNUSED_FUNCTION = YES;
503522
GCC_WARN_UNUSED_VARIABLE = YES;
504523
HEADER_SEARCH_PATHS = "include/**";
505-
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
524+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
506525
ONLY_ACTIVE_ARCH = YES;
507526
SDKROOT = iphoneos;
527+
SWIFT_VERSION = 5.0;
508528
TARGETED_DEVICE_FAMILY = "1,2";
509-
TVOS_DEPLOYMENT_TARGET = 9.0;
529+
TVOS_DEPLOYMENT_TARGET = 10.0;
510530
};
511531
name = Debug;
512532
};
513533
533ED31B1528C4840005C6FA /* Release */ = {
514534
isa = XCBuildConfiguration;
515535
buildSettings = {
516536
ALWAYS_SEARCH_USER_PATHS = NO;
537+
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
517538
CLANG_ENABLE_OBJC_ARC = YES;
539+
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
518540
CLANG_WARN_BOOL_CONVERSION = YES;
541+
CLANG_WARN_COMMA = YES;
519542
CLANG_WARN_CONSTANT_CONVERSION = YES;
543+
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
520544
CLANG_WARN_EMPTY_BODY = YES;
521545
CLANG_WARN_ENUM_CONVERSION = YES;
522546
CLANG_WARN_INFINITE_RECURSION = YES;
523547
CLANG_WARN_INT_CONVERSION = YES;
548+
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
549+
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
550+
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
551+
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
552+
CLANG_WARN_STRICT_PROTOTYPES = YES;
524553
CLANG_WARN_SUSPICIOUS_MOVE = YES;
525554
CLANG_WARN_UNREACHABLE_CODE = YES;
526555
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
@@ -537,12 +566,14 @@
537566
GCC_WARN_UNUSED_FUNCTION = YES;
538567
GCC_WARN_UNUSED_VARIABLE = YES;
539568
HEADER_SEARCH_PATHS = "include/**";
540-
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
569+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
541570
OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
542571
SDKROOT = iphoneos;
543-
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
572+
SWIFT_COMPILATION_MODE = wholemodule;
573+
SWIFT_OPTIMIZATION_LEVEL = "-O";
574+
SWIFT_VERSION = 5.0;
544575
TARGETED_DEVICE_FAMILY = "1,2";
545-
TVOS_DEPLOYMENT_TARGET = 9.0;
576+
TVOS_DEPLOYMENT_TARGET = 10.0;
546577
VALIDATE_PRODUCT = YES;
547578
};
548579
name = Release;
@@ -556,16 +587,23 @@
556587
GCC_PRECOMPILE_PREFIX_HEADER = YES;
557588
GCC_PREFIX_HEADER = "OpenSSL-for-iOS/OpenSSL-for-iOS-Prefix.pch";
558589
INFOPLIST_FILE = "OpenSSL-for-iOS/OpenSSL-for-iOS-Info.plist";
559-
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
590+
LD_RUNPATH_SEARCH_PATHS = (
591+
"$(inherited)",
592+
"@executable_path/Frameworks",
593+
);
560594
LIBRARY_SEARCH_PATHS = (
561595
"$(inherited)",
562596
"\"$(SRCROOT)/lib\"",
563597
);
598+
MARKETING_VERSION = 5.0;
564599
PRODUCT_BUNDLE_IDENTIFIER = "de.felixschulze.${PRODUCT_NAME:rfc1034identifier}";
565600
PRODUCT_NAME = OpenSSL;
566601
SWIFT_OBJC_BRIDGING_HEADER = "OpenSSL-for-iOS/OpenSSL-for-iOS-Bridging-Header.h";
567602
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
568-
SWIFT_VERSION = 3.0;
603+
SWIFT_VERSION = 5.0;
604+
TVOS_DEPLOYMENT_TARGET = 12.0;
605+
VALID_ARCHS = "arm64 arm64e";
606+
WATCHOS_DEPLOYMENT_TARGET = 6.0;
569607
WRAPPER_EXTENSION = app;
570608
};
571609
name = Debug;
@@ -579,15 +617,22 @@
579617
GCC_PRECOMPILE_PREFIX_HEADER = YES;
580618
GCC_PREFIX_HEADER = "OpenSSL-for-iOS/OpenSSL-for-iOS-Prefix.pch";
581619
INFOPLIST_FILE = "OpenSSL-for-iOS/OpenSSL-for-iOS-Info.plist";
582-
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
620+
LD_RUNPATH_SEARCH_PATHS = (
621+
"$(inherited)",
622+
"@executable_path/Frameworks",
623+
);
583624
LIBRARY_SEARCH_PATHS = (
584625
"$(inherited)",
585626
"\"$(SRCROOT)/lib\"",
586627
);
628+
MARKETING_VERSION = 5.0;
587629
PRODUCT_BUNDLE_IDENTIFIER = "de.felixschulze.${PRODUCT_NAME:rfc1034identifier}";
588630
PRODUCT_NAME = OpenSSL;
589631
SWIFT_OBJC_BRIDGING_HEADER = "OpenSSL-for-iOS/OpenSSL-for-iOS-Bridging-Header.h";
590-
SWIFT_VERSION = 3.0;
632+
SWIFT_VERSION = 5.0;
633+
TVOS_DEPLOYMENT_TARGET = 12.0;
634+
VALID_ARCHS = "arm64 arm64e";
635+
WATCHOS_DEPLOYMENT_TARGET = 6.0;
591636
WRAPPER_EXTENSION = app;
592637
};
593638
name = Release;
@@ -621,8 +666,11 @@
621666
ONLY_ACTIVE_ARCH = YES;
622667
PRODUCT_BUNDLE_IDENTIFIER = "de.felixschulze.${PRODUCT_NAME:rfc1034identifier}";
623668
PRODUCT_NAME = "$(TARGET_NAME)";
624-
SWIFT_VERSION = 3.0;
669+
SWIFT_VERSION = 5.0;
625670
TEST_HOST = "$(BUNDLE_LOADER)";
671+
TVOS_DEPLOYMENT_TARGET = 12.0;
672+
VALID_ARCHS = "arm64 arm64e";
673+
WATCHOS_DEPLOYMENT_TARGET = 6.0;
626674
WRAPPER_EXTENSION = xctest;
627675
};
628676
name = Debug;
@@ -652,8 +700,11 @@
652700
INFOPLIST_FILE = "OpenSSL-for-iOS_Tests/OpenSSL-for-iOS_Tests-Info.plist";
653701
PRODUCT_BUNDLE_IDENTIFIER = "de.felixschulze.${PRODUCT_NAME:rfc1034identifier}";
654702
PRODUCT_NAME = "$(TARGET_NAME)";
655-
SWIFT_VERSION = 3.0;
703+
SWIFT_VERSION = 5.0;
656704
TEST_HOST = "$(BUNDLE_LOADER)";
705+
TVOS_DEPLOYMENT_TARGET = 12.0;
706+
VALID_ARCHS = "arm64 arm64e";
707+
WATCHOS_DEPLOYMENT_TARGET = 6.0;
657708
WRAPPER_EXTENSION = xctest;
658709
};
659710
name = Release;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>IDEDidComputeMac32BitWarning</key>
6+
<true/>
7+
</dict>
8+
</plist>

‎OpenSSL-for-iOS.xcodeproj/xcshareddata/xcschemes/OpenSSL-for-iOS.xcscheme

+10-14
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "0800"
3+
LastUpgradeVersion = "1120"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"
@@ -27,6 +27,15 @@
2727
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
2828
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
2929
shouldUseLaunchSchemeArgsEnv = "YES">
30+
<MacroExpansion>
31+
<BuildableReference
32+
BuildableIdentifier = "primary"
33+
BlueprintIdentifier = "533ED2FA1528C4840005C6FA"
34+
BuildableName = "OpenSSL.app"
35+
BlueprintName = "OpenSSL-for-iOS"
36+
ReferencedContainer = "container:OpenSSL-for-iOS.xcodeproj">
37+
</BuildableReference>
38+
</MacroExpansion>
3039
<Testables>
3140
<TestableReference
3241
skipped = "NO">
@@ -39,17 +48,6 @@
3948
</BuildableReference>
4049
</TestableReference>
4150
</Testables>
42-
<MacroExpansion>
43-
<BuildableReference
44-
BuildableIdentifier = "primary"
45-
BlueprintIdentifier = "533ED2FA1528C4840005C6FA"
46-
BuildableName = "OpenSSL.app"
47-
BlueprintName = "OpenSSL-for-iOS"
48-
ReferencedContainer = "container:OpenSSL-for-iOS.xcodeproj">
49-
</BuildableReference>
50-
</MacroExpansion>
51-
<AdditionalOptions>
52-
</AdditionalOptions>
5351
</TestAction>
5452
<LaunchAction
5553
buildConfiguration = "Debug"
@@ -71,8 +69,6 @@
7169
ReferencedContainer = "container:OpenSSL-for-iOS.xcodeproj">
7270
</BuildableReference>
7371
</BuildableProductRunnable>
74-
<AdditionalOptions>
75-
</AdditionalOptions>
7672
</LaunchAction>
7773
<ProfileAction
7874
buildConfiguration = "Release"

‎OpenSSL-for-iOS/AppDelegate.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
1515

1616
var window: UIWindow?
1717

18-
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
18+
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
1919

2020
self.window = UIWindow(frame: UIScreen.main.bounds)
2121

‎OpenSSL-for-iOS/Icons.xcassets/AppIcon.appiconset/Contents.json

+5
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,11 @@
9797
"idiom" : "ipad",
9898
"filename" : "Icon-83.5@2x-1.png",
9999
"scale" : "2x"
100+
},
101+
{
102+
"idiom" : "ios-marketing",
103+
"size" : "1024x1024",
104+
"scale" : "1x"
100105
}
101106
],
102107
"info" : {

‎OpenSSL-for-iOS/OpenSSL-for-iOS-Info.plist

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<key>CFBundlePackageType</key>
2222
<string>APPL</string>
2323
<key>CFBundleShortVersionString</key>
24-
<string>3.1</string>
24+
<string>$(MARKETING_VERSION)</string>
2525
<key>CFBundleSignature</key>
2626
<string>????</string>
2727
<key>CFBundleVersion</key>

‎OpenSSL-for-iOS/ViewController.swift

+4-4
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class ViewController: UIViewController {
1818

1919
@IBAction
2020
func showInfo() {
21-
let message = "OpenSSL-Version: \(OPENSSL_VERSION_TEXT)\nLicense: See include/LICENSE\n\nCopyright 2010-2016 by Felix Schulze\n http://www.felixschulze.de"
21+
let message = "OpenSSL-Version: \(OPENSSL_VERSION_TEXT)\nLicense: See include/LICENSE\n\nCopyright 2010-2019 by Felix Schulze\n http://www.felixschulze.de"
2222
let alertController = UIAlertController(title: "OpenSSL-for-iOS", message: message, preferredStyle: .alert)
2323
alertController.addAction(UIAlertAction(title: "Ok", style: .cancel, handler: nil))
2424
self.present(alertController, animated: true, completion: nil)
@@ -32,16 +32,16 @@ class ViewController: UIViewController {
3232
infoButton.addTarget(self, action: #selector(ViewController.showInfo), for: .touchDown)
3333
self.navigationItem.rightBarButtonItem = UIBarButtonItem(customView: infoButton)
3434

35-
self.textField.addTarget(self, action: #selector(ViewController.textFieldDidChange), for: .editingChanged)
35+
self.textField.addTarget(self, action: #selector(ViewController.textFieldDidChange), for: UIControl.Event.editingChanged)
3636
self.calculateHash()
3737
}
3838

39-
func textFieldDidChange() {
39+
@objc func textFieldDidChange() {
4040
self.calculateHash()
4141
}
4242

4343
func calculateHash() {
44-
if textField.text!.characters.count > 0 {
44+
if textField.text!.count > 0 {
4545
md5Label.text = FSOpenSSL.md5(from: textField.text)
4646
sh256Label.text = FSOpenSSL.sha256(from: textField.text)
4747
}

‎OpenSSL-for-tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Content.imageset/Contents.json

+4
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
{
44
"idiom" : "tv",
55
"scale" : "1x"
6+
},
7+
{
8+
"idiom" : "tv",
9+
"scale" : "2x"
610
}
711
],
812
"info" : {

‎OpenSSL-for-tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Content.imageset/Contents.json

+4
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
{
44
"idiom" : "tv",
55
"scale" : "1x"
6+
},
7+
{
8+
"idiom" : "tv",
9+
"scale" : "2x"
610
}
711
],
812
"info" : {

‎OpenSSL-for-tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json

+4
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
{
44
"idiom" : "tv",
55
"scale" : "1x"
6+
},
7+
{
8+
"idiom" : "tv",
9+
"scale" : "2x"
610
}
711
],
812
"info" : {

‎OpenSSL-for-tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Content.imageset/Contents.json

+4
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
{
44
"idiom" : "tv",
55
"scale" : "1x"
6+
},
7+
{
8+
"idiom" : "tv",
9+
"scale" : "2x"
610
}
711
],
812
"info" : {

‎OpenSSL-for-tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Content.imageset/Contents.json

+4
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
{
44
"idiom" : "tv",
55
"scale" : "1x"
6+
},
7+
{
8+
"idiom" : "tv",
9+
"scale" : "2x"
610
}
711
],
812
"info" : {

‎OpenSSL-for-tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json

+4
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
{
44
"idiom" : "tv",
55
"scale" : "1x"
6+
},
7+
{
8+
"idiom" : "tv",
9+
"scale" : "2x"
610
}
711
],
812
"info" : {

‎OpenSSL-for-tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Contents.json

+7-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@
1212
"filename" : "App Icon - Small.imagestack",
1313
"role" : "primary-app-icon"
1414
},
15+
{
16+
"size" : "2320x720",
17+
"idiom" : "tv",
18+
"filename" : "Top Shelf Image Wide.imageset",
19+
"role" : "top-shelf-image-wide"
20+
},
1521
{
1622
"size" : "1920x720",
1723
"idiom" : "tv",
@@ -23,4 +29,4 @@
2329
"version" : 1,
2430
"author" : "xcode"
2531
}
26-
}
32+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"images" : [
3+
{
4+
"idiom" : "tv",
5+
"scale" : "1x"
6+
},
7+
{
8+
"idiom" : "tv",
9+
"scale" : "2x"
10+
}
11+
],
12+
"info" : {
13+
"version" : 1,
14+
"author" : "xcode"
15+
}
16+
}

‎OpenSSL-for-tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image.imageset/Contents.json

+4
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
{
44
"idiom" : "tv",
55
"scale" : "1x"
6+
},
7+
{
8+
"idiom" : "tv",
9+
"scale" : "2x"
610
}
711
],
812
"info" : {

‎OpenSSL-for-tvOS/Assets.xcassets/LaunchImage.launchimage/Contents.json

+7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
{
22
"images" : [
3+
{
4+
"orientation" : "landscape",
5+
"idiom" : "tv",
6+
"extent" : "full-screen",
7+
"minimum-system-version" : "11.0",
8+
"scale" : "2x"
9+
},
310
{
411
"orientation" : "landscape",
512
"idiom" : "tv",

‎OpenSSL-for-tvOS/Info.plist

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<key>CFBundlePackageType</key>
1616
<string>APPL</string>
1717
<key>CFBundleShortVersionString</key>
18-
<string>1.0</string>
18+
<string>$(MARKETING_VERSION)</string>
1919
<key>CFBundleSignature</key>
2020
<string>????</string>
2121
<key>CFBundleVersion</key>

‎README.md

+8-7
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,33 @@
1-
# OpenSSL-for-iOS [![Build Status](https://travis-ci.org/x2on/OpenSSL-for-iPhone.svg)](https://travis-ci.org/x2on/OpenSSL-for-iPhone) [![license](https://img.shields.io/github/license/x2on/OpenSSL-for-iPhone.svg)](https://github.com/x2on/OpenSSL-for-iPhone/blob/master/LICENSE) [![OpenSSL version](https://img.shields.io/badge/OpenSSL-1.0.2l-lightgrey.svg)]() [![OpenSSL version](https://img.shields.io/badge/OpenSSL-1.1.0f-lightgrey.svg)]() [![iOS support](https://img.shields.io/badge/iOS-7.0%20--%2010.2-lightgrey.svg)]() [![tvOS support](https://img.shields.io/badge/tvOS-9.2--%2010.1-lightgrey.svg)]() [![MacCatalyst support](https://img.shields.io/badge/MacCatalyst-10.15-lightgrey.svg)]()
1+
# OpenSSL-for-iOS [![Build Status](https://travis-ci.org/x2on/OpenSSL-for-iPhone.svg)](https://travis-ci.org/x2on/OpenSSL-for-iPhone) [![license](https://img.shields.io/github/license/x2on/OpenSSL-for-iPhone.svg)](https://github.com/x2on/OpenSSL-for-iPhone/blob/master/LICENSE) [![OpenSSL version](https://img.shields.io/badge/OpenSSL-1.1.0l-lightgrey.svg)]() [![iOS support](https://img.shields.io/badge/iOS-12.0%20--%2013.2-lightgrey.svg)]() [![tvOS support](https://img.shields.io/badge/tvOS-12.0--%2013.2-lightgrey.svg)]() [![MacCatalyst support](https://img.shields.io/badge/MacCatalyst-10.15-lightgrey.svg)]()
22

33

44

55
This is a script for using self-compiled builds of the OpenSSL-library on the iPhone. You can build apps with Xcode and the official SDK from Apple with this. I also made a small example-app for using the libraries with Xcode and the iPhone/iPhone-Simulator.
66

77
**Enjoy OpenSSL on the iPhone!**
88

9-
You must build the OpenSSL-Libraries (1.0.2k) before running the sample with:
9+
You must build the OpenSSL-Libraries (1.1.0l) before running the sample with:
1010
```bash
1111
./build-libssl.sh
1212
```
1313

14-
To build OpenSSL 1.1.0e build the OpenSSL-Libraries with:
14+
For other versions build the OpenSSL-Libraries with:
1515
```bash
16-
./build-libssl.sh --version=1.1.0f
16+
./build-libssl.sh --version=1.1.0l
1717
```
1818

1919
For all options see the help
2020
```bash
2121
./build-libssl.sh --help
2222
```
2323

24-
This repository contains an iOS 10.0 Xcode Project which uses the OpenSSL Libraries. The examples uses the MD5 or SHA256-algorithm to calculate an md5 or sha256 hash from an UITextfield.
24+
This repository contains an iOS 12.0 Xcode Project which uses the OpenSSL Libraries. The examples uses the MD5 or SHA256-algorithm to calculate an md5 or sha256 hash from an UITextfield.
2525

2626
## System support
27-
**iOS 7.0 - iOS 10.2 (i386, x86_64, armv7, armv7s, armv64, bitcode), tvOS 9.2 - tvOS 10.1 (x86_64, arm64, bitcode) and MacCatalyst 10.15 (MacOSX_x86_64) are currently supported.**
27+
**iOS 12.0 - iOS 13.2 (x86_64 , armv64, bitcode), tvOS 12.0 - tvOS 13.2 (x86_64, arm64, bitcode) and MacCatalyst 10.15 (MacOSX_x86_64) are currently supported.**
2828

2929
For iOS < 7.0 you must use Xcode < 7 and an older version of the build script.
30+
For iOS < 12.0 you must use Xcode < 11 and an older version of the build script.
3031

3132
If you have problems building for arm64 please uninstall MacPorts (see [#28](https://github.com/x2on/OpenSSL-for-iPhone/issues/28)).
3233

@@ -35,7 +36,7 @@ If you have problems building for arm64 please uninstall MacPorts (see [#28](htt
3536
* <http://www.x2on.de/2010/07/13/tutorial-iphone-app-with-compiled-openssl-1-0-0a-library/>
3637

3738
## Changelog
38-
* 2019-11-27: Add support for MacCatalyst
39+
* 2019-11-27: Add support for MacCatalyst, Xcode 11.2.1 (iOS 12.0 - 13.2), Migrate to Swift 5, Remove OpenSSL 1.0.2 support
3940
* 2017-05-25: OpenSSL 1.0.2l, 1.1.0f
4041
* 2017-02-16: OpenSSL 1.1.0e
4142
* 2017-01-28: OpenSSL 1.0.2k, 1.1.0d, Xcode 8.2 (iOS 10.2 and tvOS 10.1)

‎build-libssl.sh

+19-54
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# for iPhoneOS and iPhoneSimulator
55
#
66
# Created by Felix Schulze on 16.12.10.
7-
# Copyright 2010-2017 Felix Schulze. All rights reserved.
7+
# Copyright 2010-2019 Felix Schulze. All rights reserved.
88
#
99
# Licensed under the Apache License, Version 2.0 (the "License");
1010
# you may not use this file except in compliance with the License.
@@ -25,15 +25,14 @@ set -u
2525
# SCRIPT DEFAULTS
2626

2727
# Default version in case no version is specified
28-
DEFAULTVERSION="1.0.2l"
28+
DEFAULTVERSION="1.1.0l"
2929

30-
# Default (=full) set of architectures (OpenSSL <= 1.0.2) or targets (OpenSSL >= 1.1.0) to build
31-
DEFAULTARCHS="x86_64 i386 arm64 armv7s armv7 tv_x86_64 tv_arm64" # MacOSX_x86_64 is a valid architecture that is not in the DEFAULTARCHS because it's incompatible with "x86_64"
32-
DEFAULTTARGETS="ios-sim-cross-x86_64 ios-sim-cross-i386 ios64-cross-arm64 ios-cross-armv7s ios-cross-armv7 tvos-sim-cross-x86_64 tvos64-cross-arm64" # mac-catalyst-x86_64 is a valid target that is not in the DEFAULTTARGETS because it's incompatible with "ios-sim-cross-x86_64"
30+
# Default (=full) set of targets to build
31+
DEFAULTTARGETS="ios-sim-cross-x86_64 ios64-cross-arm64 tvos-sim-cross-x86_64 tvos64-cross-arm64" # mac-catalyst-x86_64 is a valid target that is not in the DEFAULTTARGETS because it's incompatible with "ios-sim-cross-x86_64"
3332

3433
# Minimum iOS/tvOS SDK version to build for
35-
IOS_MIN_SDK_VERSION="7.0"
36-
TVOS_MIN_SDK_VERSION="9.0"
34+
IOS_MIN_SDK_VERSION="12.0"
35+
TVOS_MIN_SDK_VERSION="12.0"
3736
MACOSX_MIN_SDK_VERSION="10.15"
3837

3938
# Init optional env variables (use available variable or default to empty string)
@@ -56,12 +55,6 @@ echo_help()
5655
echo " -v, --verbose Enable verbose logging"
5756
echo " --verbose-on-error Dump last 500 lines from log file if an error occurs (for Travis builds)"
5857
echo " --version=VERSION OpenSSL version to build (defaults to ${DEFAULTVERSION})"
59-
echo
60-
echo "Options for OpenSSL 1.0.2 and lower ONLY"
61-
echo " --archs=\"ARCH ARCH ...\" Space-separated list of architectures to build"
62-
echo " Options: ${DEFAULTARCHS} MacOSX_x86_64"
63-
echo
64-
echo "Options for OpenSSL 1.1.0 and higher ONLY"
6558
echo " --deprecated Exclude no-deprecated configure option and build with deprecated methods"
6659
echo " --targets=\"TARGET TARGET ...\" Space-separated list of build targets"
6760
echo " Options: ${DEFAULTTARGETS} mac-catalyst-x86_64"
@@ -276,14 +269,14 @@ if [[ -n "${VERSION}" && -n "${BRANCH}" ]]; then
276269

277270
# Specific version: Verify version number format. Expected: dot notation
278271
elif [[ -n "${VERSION}" && ! "${VERSION}" =~ ^[0-9]+\.[0-9]+\.[0-9]+[a-z]*$ ]]; then
279-
echo "Unknown version number format. Examples: 1.0.2, 1.0.2h"
272+
echo "Unknown version number format. Examples: 1.1.0, 1.1.0l"
280273
exit 1
281274

282275
# Specific branch
283276
elif [ -n "${BRANCH}" ]; then
284277
# Verify version number format. Expected: dot notation
285278
if [[ ! "${BRANCH}" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
286-
echo "Unknown branch version number format. Examples: 1.0.2, 1.1.0"
279+
echo "Unknown branch version number format. Examples: 1.1.0, 1.2.0"
287280
exit 1
288281

289282
# Valid version number, determine latest version
@@ -305,36 +298,16 @@ elif [ -z "${VERSION}" ]; then
305298
VERSION="${DEFAULTVERSION}"
306299
fi
307300

308-
# Build type:
309-
# In short, type "archs" is used for OpenSSL versions in the 1.0 branch and type "targets" for later versions.
310-
#
311-
# Significant changes to the build process were introduced with OpenSSL 1.1.0. As a result, this script was updated
312-
# to include two separate build loops for versions <= 1.0 and versions >= 1.1. The type "archs" matches the key variable
313-
# used to determine for which platforms to build for the 1.0 branch. Since 1.1, all platforms are defined in a separate/
314-
# custom configuration file as build targets. Therefore the key variable and type are called targets for 1.1 (and later).
315-
316-
# OpenSSL branches <= 1.0
317-
if [[ "${VERSION}" =~ ^(0\.9|1\.0) ]]; then
318-
BUILD_TYPE="archs"
319-
320-
# Set default for ARCHS if not specified
321-
if [ ! -n "${ARCHS}" ]; then
322-
ARCHS="${DEFAULTARCHS}"
323-
fi
301+
BUILD_TYPE="targets"
324302

325-
# OpenSSL branches >= 1.1
326-
else
327-
BUILD_TYPE="targets"
328-
329-
# Set default for TARGETS if not specified
330-
if [ ! -n "${TARGETS}" ]; then
331-
TARGETS="${DEFAULTTARGETS}"
332-
fi
303+
# Set default for TARGETS if not specified
304+
if [ ! -n "${TARGETS}" ]; then
305+
TARGETS="${DEFAULTTARGETS}"
306+
fi
333307

334-
# Add no-deprecated config option (if not overwritten)
335-
if [ "${CONFIG_NO_DEPRECATED}" != "false" ]; then
336-
CONFIG_OPTIONS="${CONFIG_OPTIONS} no-deprecated"
337-
fi
308+
# Add no-deprecated config option (if not overwritten)
309+
if [ "${CONFIG_NO_DEPRECATED}" != "false" ]; then
310+
CONFIG_OPTIONS="${CONFIG_OPTIONS} no-deprecated"
338311
fi
339312

340313
# Determine SDK versions
@@ -389,11 +362,7 @@ esac
389362
echo
390363
echo "Build options"
391364
echo " OpenSSL version: ${VERSION}"
392-
if [ "${BUILD_TYPE}" == "archs" ]; then
393-
echo " Architectures: ${ARCHS}"
394-
else
395-
echo " Targets: ${TARGETS}"
396-
fi
365+
echo " Targets: ${TARGETS}"
397366
echo " iOS SDK: ${IOS_SDKVERSION}"
398367
echo " tvOS SDK: ${TVOS_SDKVERSION}"
399368
if [ "${CONFIG_DISABLE_BITCODE}" == "true" ]; then
@@ -477,12 +446,8 @@ LIBCRYPTO_IOS=()
477446
LIBSSL_TVOS=()
478447
LIBCRYPTO_TVOS=()
479448

480-
# Run relevant build loop (archs = 1.0 style, targets = 1.1 style)
481-
if [ "${BUILD_TYPE}" == "archs" ]; then
482-
source "${SCRIPTDIR}/scripts/build-loop-archs.sh"
483-
else
484-
source "${SCRIPTDIR}/scripts/build-loop-targets.sh"
485-
fi
449+
# Run relevant build loop
450+
source "${SCRIPTDIR}/scripts/build-loop-targets.sh"
486451

487452
# Build iOS library if selected for build
488453
if [ ${#LIBSSL_IOS[@]} -gt 0 ]; then

‎scripts/build-loop-archs.sh

-132
This file was deleted.

‎travis-build.sh

+5-21
Original file line numberDiff line numberDiff line change
@@ -11,30 +11,14 @@ log_output()
1111
# Shut up curl
1212
export CURL_OPTIONS="-s"
1313

14-
# Build 1.0.2 in current directory
15-
./build-libssl.sh --noparallel --verbose-on-error | log_output "ARCHS " &
16-
PID_ARCHS=$!
17-
18-
# Build 1.1.0 in (temporary) subdirectory
19-
mkdir targets
20-
cd targets
21-
cp -r ../include .
22-
../build-libssl.sh --noparallel --verbose-on-error --ec-nistp-64-gcc-128 --version=1.1.0f | log_output "TARGETS" &
14+
# Build in current directory
15+
./build-libssl.sh --noparallel --verbose-on-error | log_output "TARGETS " &
2316
PID_TARGETS=$!
2417

2518
echo "SCRIPT Started jobs, waiting for jobs to finish"
26-
wait ${PID_ARCHS}
2719
wait ${PID_TARGETS}
2820

29-
# Verify/prepare 1.1.0 build dir
30-
xcrun -sdk iphoneos lipo -info ./lib/*.a | log_output "TARGETS"
31-
../create-openssl-framework.sh | log_output "TARGETS"
32-
xcrun -sdk iphoneos lipo -info openssl.framework/openssl | log_output "TARGETS"
33-
cp -r ../OpenSSL-for-* .
34-
35-
# Back to main dir
36-
cd ..
37-
xcrun -sdk iphoneos lipo -info ./lib/*.a | log_output "ARCHS "
38-
./create-openssl-framework.sh | log_output "ARCHS "
39-
xcrun -sdk iphoneos lipo -info openssl.framework/openssl | log_output "ARCHS "
21+
xcrun -sdk iphoneos lipo -info ./lib/*.a | log_output "TARGETS "
22+
./create-openssl-framework.sh | log_output "TARGETS "
23+
xcrun -sdk iphoneos lipo -info openssl.framework/openssl | log_output "TARGETS "
4024

0 commit comments

Comments
 (0)
Please sign in to comment.