Merge branch 'master' into 1.0.2-parallel

This commit is contained in:
oneton 2016-09-18 12:41:12 +02:00 committed by GitHub
commit 12a7473d1f
8 changed files with 64 additions and 19 deletions

View File

@ -1,4 +1,4 @@
osx_image: xcode7.3 osx_image: xcode8
language: objective-c language: objective-c
before_install: before_install:
- ./build-libssl.sh verbose-on-error - ./build-libssl.sh verbose-on-error
@ -7,4 +7,6 @@ before_install:
- xcrun -sdk iphoneos lipo -info openssl.framework/openssl - xcrun -sdk iphoneos lipo -info openssl.framework/openssl
script: script:
- xctool -project OpenSSL-for-iOS.xcodeproj -scheme OpenSSL-for-iOS -sdk iphonesimulator clean build - xcodebuild -project OpenSSL-for-iOS.xcodeproj -scheme OpenSSL-for-iOS -sdk iphonesimulator clean build
# xctool 0.2.9 doesn't support Xcode 8 yet (see https://github.com/facebook/xctool/issues/704)
#- xctool -project OpenSSL-for-iOS.xcodeproj -scheme OpenSSL-for-iOS -sdk iphonesimulator clean build

View File

@ -271,13 +271,18 @@
533ED2F21528C4840005C6FA /* Project object */ = { 533ED2F21528C4840005C6FA /* Project object */ = {
isa = PBXProject; isa = PBXProject;
attributes = { attributes = {
LastUpgradeCheck = 0710; LastUpgradeCheck = 0800;
ORGANIZATIONNAME = Immobilienscout24; ORGANIZATIONNAME = Immobilienscout24;
TargetAttributes = { TargetAttributes = {
2A8A9A6E1BFA59F7002944B4 = { 2A8A9A6E1BFA59F7002944B4 = {
CreatedOnToolsVersion = 7.1.1; CreatedOnToolsVersion = 7.1.1;
LastSwiftMigration = 0800;
};
533ED2FA1528C4840005C6FA = {
LastSwiftMigration = 0800;
}; };
53572A4A183AAFFE00B21832 = { 53572A4A183AAFFE00B21832 = {
LastSwiftMigration = 0800;
TestTargetID = 533ED2FA1528C4840005C6FA; TestTargetID = 533ED2FA1528C4840005C6FA;
}; };
}; };
@ -424,6 +429,7 @@
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = appletvos; SDKROOT = appletvos;
SWIFT_OBJC_BRIDGING_HEADER = "OpenSSL-for-iOS/OpenSSL-for-iOS-Bridging-Header.h"; SWIFT_OBJC_BRIDGING_HEADER = "OpenSSL-for-iOS/OpenSSL-for-iOS-Bridging-Header.h";
SWIFT_VERSION = 3.0;
TARGETED_DEVICE_FAMILY = 3; TARGETED_DEVICE_FAMILY = 3;
TVOS_DEPLOYMENT_TARGET = 9.0; TVOS_DEPLOYMENT_TARGET = 9.0;
}; };
@ -455,6 +461,7 @@
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = appletvos; SDKROOT = appletvos;
SWIFT_OBJC_BRIDGING_HEADER = "OpenSSL-for-iOS/OpenSSL-for-iOS-Bridging-Header.h"; SWIFT_OBJC_BRIDGING_HEADER = "OpenSSL-for-iOS/OpenSSL-for-iOS-Bridging-Header.h";
SWIFT_VERSION = 3.0;
TARGETED_DEVICE_FAMILY = 3; TARGETED_DEVICE_FAMILY = 3;
TVOS_DEPLOYMENT_TARGET = 9.0; TVOS_DEPLOYMENT_TARGET = 9.0;
}; };
@ -469,7 +476,9 @@
CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "iPhone Developer"; CODE_SIGN_IDENTITY = "iPhone Developer";
@ -510,7 +519,9 @@
CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "iPhone Developer"; CODE_SIGN_IDENTITY = "iPhone Developer";
@ -529,6 +540,7 @@
IPHONEOS_DEPLOYMENT_TARGET = 8.0; IPHONEOS_DEPLOYMENT_TARGET = 8.0;
OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
SDKROOT = iphoneos; SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
TARGETED_DEVICE_FAMILY = "1,2"; TARGETED_DEVICE_FAMILY = "1,2";
TVOS_DEPLOYMENT_TARGET = 9.0; TVOS_DEPLOYMENT_TARGET = 9.0;
VALIDATE_PRODUCT = YES; VALIDATE_PRODUCT = YES;
@ -553,6 +565,7 @@
PRODUCT_NAME = OpenSSL; PRODUCT_NAME = OpenSSL;
SWIFT_OBJC_BRIDGING_HEADER = "OpenSSL-for-iOS/OpenSSL-for-iOS-Bridging-Header.h"; SWIFT_OBJC_BRIDGING_HEADER = "OpenSSL-for-iOS/OpenSSL-for-iOS-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 3.0;
WRAPPER_EXTENSION = app; WRAPPER_EXTENSION = app;
}; };
name = Debug; name = Debug;
@ -574,6 +587,7 @@
PRODUCT_BUNDLE_IDENTIFIER = "de.felixschulze.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_BUNDLE_IDENTIFIER = "de.felixschulze.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = OpenSSL; PRODUCT_NAME = OpenSSL;
SWIFT_OBJC_BRIDGING_HEADER = "OpenSSL-for-iOS/OpenSSL-for-iOS-Bridging-Header.h"; SWIFT_OBJC_BRIDGING_HEADER = "OpenSSL-for-iOS/OpenSSL-for-iOS-Bridging-Header.h";
SWIFT_VERSION = 3.0;
WRAPPER_EXTENSION = app; WRAPPER_EXTENSION = app;
}; };
name = Release; name = Release;
@ -607,6 +621,7 @@
ONLY_ACTIVE_ARCH = YES; ONLY_ACTIVE_ARCH = YES;
PRODUCT_BUNDLE_IDENTIFIER = "de.felixschulze.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_BUNDLE_IDENTIFIER = "de.felixschulze.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
TEST_HOST = "$(BUNDLE_LOADER)"; TEST_HOST = "$(BUNDLE_LOADER)";
WRAPPER_EXTENSION = xctest; WRAPPER_EXTENSION = xctest;
}; };
@ -637,6 +652,7 @@
INFOPLIST_FILE = "OpenSSL-for-iOS_Tests/OpenSSL-for-iOS_Tests-Info.plist"; INFOPLIST_FILE = "OpenSSL-for-iOS_Tests/OpenSSL-for-iOS_Tests-Info.plist";
PRODUCT_BUNDLE_IDENTIFIER = "de.felixschulze.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_BUNDLE_IDENTIFIER = "de.felixschulze.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
TEST_HOST = "$(BUNDLE_LOADER)"; TEST_HOST = "$(BUNDLE_LOADER)";
WRAPPER_EXTENSION = xctest; WRAPPER_EXTENSION = xctest;
}; };

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<Scheme <Scheme
LastUpgradeVersion = "0710" LastUpgradeVersion = "0800"
version = "1.3"> version = "1.3">
<BuildAction <BuildAction
parallelizeBuildables = "YES" parallelizeBuildables = "YES"

View File

@ -15,15 +15,15 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow? var window: UIWindow?
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
self.window = UIWindow(frame: UIScreen.mainScreen().bounds) self.window = UIWindow(frame: UIScreen.main.bounds)
#if os(tvOS) #if os(tvOS)
self.window?.rootViewController = ViewController(nibName: "ViewController~tv", bundle: nil) self.window?.rootViewController = ViewController(nibName: "ViewController~tv", bundle: nil)
#else #else
let navigationController = UINavigationController(rootViewController: ViewController()) let navigationController = UINavigationController(rootViewController: ViewController())
navigationController.navigationBar.translucent = false navigationController.navigationBar.isTranslucent = false
self.window?.rootViewController = navigationController self.window?.rootViewController = navigationController
#endif #endif

View File

@ -1,5 +1,15 @@
{ {
"images" : [ "images" : [
{
"idiom" : "iphone",
"size" : "20x20",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "20x20",
"scale" : "3x"
},
{ {
"size" : "29x29", "size" : "29x29",
"idiom" : "iphone", "idiom" : "iphone",
@ -36,6 +46,16 @@
"filename" : "Icon-60@3x.png", "filename" : "Icon-60@3x.png",
"scale" : "3x" "scale" : "3x"
}, },
{
"idiom" : "ipad",
"size" : "20x20",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "20x20",
"scale" : "2x"
},
{ {
"size" : "29x29", "size" : "29x29",
"idiom" : "ipad", "idiom" : "ipad",
@ -71,6 +91,12 @@
"idiom" : "ipad", "idiom" : "ipad",
"filename" : "Icon-76@2x.png", "filename" : "Icon-76@2x.png",
"scale" : "2x" "scale" : "2x"
},
{
"size" : "83.5x83.5",
"idiom" : "ipad",
"filename" : "Icon-83.5@2x-1.png",
"scale" : "2x"
} }
], ],
"info" : { "info" : {

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View File

@ -18,21 +18,21 @@ class ViewController: UIViewController {
@IBAction @IBAction
func showInfo() { func showInfo() {
let message = "OpenSSL-Version: \(OPENSSL_VERSION_TEXT)\nLicense: See include/LICENSE\n\nCopyright 2010-2015 by Felix Schulze\n http://www.felixschulze.de" let message = "OpenSSL-Version: \(OPENSSL_VERSION_TEXT)\nLicense: See include/LICENSE\n\nCopyright 2010-2016 by Felix Schulze\n http://www.felixschulze.de"
let alertController = UIAlertController(title: "OpenSSL-for-iOS", message: message, preferredStyle: .Alert) let alertController = UIAlertController(title: "OpenSSL-for-iOS", message: message, preferredStyle: .alert)
alertController.addAction(UIAlertAction(title: "Ok", style: .Cancel, handler: nil)) alertController.addAction(UIAlertAction(title: "Ok", style: .cancel, handler: nil))
self.presentViewController(alertController, animated: true, completion: nil) self.present(alertController, animated: true, completion: nil)
} }
override func viewDidLoad() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()
self.title = "OpenSSL-for-iOS" self.title = "OpenSSL-for-iOS"
let infoButton = UIButton(type: .InfoLight) let infoButton = UIButton(type: .infoLight)
infoButton.addTarget(self, action: #selector(ViewController.showInfo), forControlEvents: .TouchDown) infoButton.addTarget(self, action: #selector(ViewController.showInfo), for: .touchDown)
self.navigationItem.rightBarButtonItem = UIBarButtonItem(customView: infoButton) self.navigationItem.rightBarButtonItem = UIBarButtonItem(customView: infoButton)
self.textField.addTarget(self, action: #selector(ViewController.textFieldDidChange), forControlEvents: .EditingChanged) self.textField.addTarget(self, action: #selector(ViewController.textFieldDidChange), for: .editingChanged)
self.calculateHash() self.calculateHash()
} }
@ -42,8 +42,8 @@ class ViewController: UIViewController {
func calculateHash() { func calculateHash() {
if textField.text!.characters.count > 0 { if textField.text!.characters.count > 0 {
md5Label.text = FSOpenSSL.md5FromString(textField.text) md5Label.text = FSOpenSSL.md5(from: textField.text)
sh256Label.text = FSOpenSSL.sha256FromString(textField.text) sh256Label.text = FSOpenSSL.sha256(from: textField.text)
} }
else { else {
md5Label.text = nil md5Label.text = nil

View File

@ -1,4 +1,4 @@
# 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.2h-lightgrey.svg)]() [![iOS support](https://img.shields.io/badge/iOS-7.0%20--%209.3-lightgrey.svg)]() [![tvOS support](https://img.shields.io/badge/tvOS-9.2-lightgrey.svg)]() # 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.2h-lightgrey.svg)]() [![iOS support](https://img.shields.io/badge/iOS-7.0%20--%2010.0-lightgrey.svg)]() [![tvOS support](https://img.shields.io/badge/tvOS-9.2--%2010.0-lightgrey.svg)]()
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. 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.
@ -9,10 +9,10 @@ You must build the OpenSSL-Libraries before running the sample with:
./build-libssl.sh ./build-libssl.sh
``` ```
This repository contains an iOS 9.1 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. 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.
## System support ## System support
**iOS 7.0 - iOS 9.3 (i386, x86_64, armv7, armv7s, armv64, bitcode) and tvOS are currently supported.** **iOS 7.0 - iOS 10.0 (i386, x86_64, armv7, armv7s, armv64, bitcode) and tvOS are currently supported.**
For iOS < 7.0 you must use Xcode < 7 and an older version of the build script. For iOS < 7.0 you must use Xcode < 7 and an older version of the build script.
@ -23,6 +23,7 @@ If you have problems building for arm64 please uninstall MacPorts (see [#28](htt
* <http://www.x2on.de/2010/07/13/tutorial-iphone-app-with-compiled-openssl-1-0-0a-library/> * <http://www.x2on.de/2010/07/13/tutorial-iphone-app-with-compiled-openssl-1-0-0a-library/>
## Changelog ## Changelog
* 2016-09-18: Xcode 8 support, iOS 10.0
* 2016-08-09: Xcode 7.3 support, iOS 9.3 * 2016-08-09: Xcode 7.3 support, iOS 9.3
* 2016-05-04: OpenSSL 1.0.2h * 2016-05-04: OpenSSL 1.0.2h
* 2015-12-11: Xcode 7.2 support, iOS 9.2 * 2015-12-11: Xcode 7.2 support, iOS 9.2