diff --git a/Podfile b/Podfile index 14da8761a..c9f932438 100644 --- a/Podfile +++ b/Podfile @@ -1,23 +1,28 @@ platform :ios, '8.0' source 'https://github.com/CocoaPods/Specs.git' -def shared_pods - pod 'Mantle', :inhibit_warnings => true - pod 'YapDatabase/SQLCipher', '~> 2.9.3', :inhibit_warnings => true - pod 'AxolotlKit', git: 'https://github.com/WhisperSystems/SignalProtocolKit.git' - #pod 'AxolotlKit', path: '../SignalProtocolKit' - pod 'PureLayout', :inhibit_warnings => true - pod 'OpenSSL', git: 'https://github.com/WhisperSystems/OpenSSL-Pod', inhibit_warnings: true - pod 'Reachability', :inhibit_warnings => true - pod 'SignalServiceKit', path: '.' - pod 'SocketRocket', :git => 'https://github.com/facebook/SocketRocket.git', :inhibit_warnings => true - pod 'YYImage' -end +use_frameworks! -post_install do |installer| - # Disable some asserts when building for tests - set_building_for_tests_config(installer, 'SignalServiceKit') - enable_extension_support_for_purelayout(installer) +def shared_pods + # OWS Pods + pod 'SignalServiceKit', path: '.' + pod 'AxolotlKit', git: 'https://github.com/WhisperSystems/SignalProtocolKit.git', branch: 'mkirk/framework-friendly' + #pod 'AxolotlKit', path: '../SignalProtocolKit' + pod 'HKDFKit', git: 'https://github.com/WhisperSystems/HKDFKit.git', branch: 'mkirk/framework-friendly' + #pod 'HKDFKit', path: '../HKDFKit' + pod 'Curve25519Kit', git: 'https://github.com/WhisperSystems/Curve25519Kit', branch: 'mkirk/framework-friendly' + #pod 'Curve25519Kit', path: '../Curve25519Kit' + #pod 'OpenSSL', git: 'https://github.com/WhisperSystems/OpenSSL-Pod', inhibit_warnings: true + # TODO switch OpenSSL lib + pod 'GRKOpenSSLFramework' + + # third party pods + pod 'Mantle', :inhibit_warnings => true + pod 'YapDatabase/SQLCipher', '~> 2.9.3', :inhibit_warnings => true + pod 'PureLayout', :inhibit_warnings => true + pod 'Reachability', :inhibit_warnings => true + pod 'SocketRocket', :git => 'https://github.com/facebook/SocketRocket.git', :inhibit_warnings => true + pod 'YYImage' end target 'Signal' do @@ -35,6 +40,12 @@ target 'SignalShareExtension' do shared_pods end +post_install do |installer| + # Disable some asserts when building for tests + set_building_for_tests_config(installer, 'SignalServiceKit') + enable_extension_support_for_purelayout(installer) +end + # There are some asserts and debug checks that make testing difficult - e.g. Singleton asserts def set_building_for_tests_config(installer, target_name) target = installer.pods_project.targets.detect { |target| target.to_s == target_name } @@ -57,8 +68,9 @@ def set_building_for_tests_config(installer, target_name) build_config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] = "#{existing_definitions} POD_CONFIGURATION_TEST=1 COCOAPODS=1 SSK_BUILDING_FOR_TESTS=1" end +# PureLayout by default makes use of UIApplication, and must be configured to be built for an extension. def enable_extension_support_for_purelayout(installer) - installer.pods_project.targets.each do |target| + installer.pods_project.targets.each do |target| if target.name.end_with? "PureLayout" target.build_configurations.each do |build_configuration| if build_configuration.build_settings['APPLICATION_EXTENSION_API_ONLY'] == 'YES' diff --git a/Podfile.lock b/Podfile.lock index c5add7910..15d98a5fc 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -1,5 +1,4 @@ PODS: - - 25519 (2.0.2) - AFNetworking (3.1.0): - AFNetworking/NSURLSession (= 3.1.0) - AFNetworking/Reachability (= 3.1.0) @@ -16,9 +15,9 @@ PODS: - AFNetworking/UIKit (3.1.0): - AFNetworking/NSURLSession - ATAppUpdater (2.0) - - AxolotlKit (0.8.1): - - 25519 (~> 2.0.1) + - AxolotlKit (0.9.0): - CocoaLumberjack + - Curve25519Kit (~> 2.1.0) - HKDFKit (~> 0.0.3) - ProtocolBuffers (~> 1.9.8) - CocoaLumberjack (2.4.0): @@ -29,7 +28,9 @@ PODS: - CocoaLumberjack/Core - CocoaLumberjack/Extensions (2.4.0): - CocoaLumberjack/Default - - HKDFKit (0.0.3) + - Curve25519Kit (2.1.0) + - GRKOpenSSLFramework (1.0.2.11.2) + - HKDFKit (0.0.4) - JSQMessagesViewController (7.3.4): - JSQSystemSoundPlayer (~> 2.0.1) - JSQSystemSoundPlayer (2.0.1) @@ -37,19 +38,18 @@ PODS: - Mantle (2.1.0): - Mantle/extobjc (= 2.1.0) - Mantle/extobjc (2.1.0) - - OpenSSL (1.0.213) - ProtocolBuffers (1.9.11) - PureLayout (3.0.2) - Reachability (3.2) - SAMKeychain (1.5.3) - SignalServiceKit (0.9.0): - - 25519 - AFNetworking - AxolotlKit - CocoaLumberjack + - Curve25519Kit + - GRKOpenSSLFramework - libPhoneNumber-iOS - Mantle - - OpenSSL - Reachability - SAMKeychain - SocketRocket @@ -116,10 +116,12 @@ PODS: DEPENDENCIES: - ATAppUpdater - - AxolotlKit (from `https://github.com/WhisperSystems/SignalProtocolKit.git`) + - AxolotlKit (from `https://github.com/WhisperSystems/SignalProtocolKit.git`, branch `mkirk/framework-friendly`) + - Curve25519Kit (from `https://github.com/WhisperSystems/Curve25519Kit`, branch `mkirk/framework-friendly`) + - GRKOpenSSLFramework + - HKDFKit (from `https://github.com/WhisperSystems/HKDFKit.git`, branch `mkirk/framework-friendly`) - JSQMessagesViewController (from `https://github.com/WhisperSystems/JSQMessagesViewController.git`, branch `signal-master`) - Mantle - - OpenSSL (from `https://github.com/WhisperSystems/OpenSSL-Pod`) - PureLayout - Reachability - SignalServiceKit (from `.`) @@ -129,12 +131,17 @@ DEPENDENCIES: EXTERNAL SOURCES: AxolotlKit: + :branch: mkirk/framework-friendly :git: https://github.com/WhisperSystems/SignalProtocolKit.git + Curve25519Kit: + :branch: mkirk/framework-friendly + :git: https://github.com/WhisperSystems/Curve25519Kit + HKDFKit: + :branch: mkirk/framework-friendly + :git: https://github.com/WhisperSystems/HKDFKit.git JSQMessagesViewController: :branch: signal-master :git: https://github.com/WhisperSystems/JSQMessagesViewController.git - OpenSSL: - :git: https://github.com/WhisperSystems/OpenSSL-Pod SignalServiceKit: :path: . SocketRocket: @@ -142,35 +149,38 @@ EXTERNAL SOURCES: CHECKOUT OPTIONS: AxolotlKit: - :commit: 6e9d5e8c3dc87e397b4b7485172507b0990a22dd + :commit: 6dd55895b523e887c633bd31b9eedbfb515b8a5d :git: https://github.com/WhisperSystems/SignalProtocolKit.git + Curve25519Kit: + :commit: 03a19c80aafc10a3464f0c086b1eb38239c507ac + :git: https://github.com/WhisperSystems/Curve25519Kit + HKDFKit: + :commit: d2e2e50990e88537d6c4e38cc32a6f6debd83446 + :git: https://github.com/WhisperSystems/HKDFKit.git JSQMessagesViewController: :commit: 7d9e7562c67f3c7c71962bf9fe15c1695333c92f :git: https://github.com/WhisperSystems/JSQMessagesViewController.git - OpenSSL: - :commit: 6abae10151c621c523fc7d9faf9d1f7dac1da669 - :git: https://github.com/WhisperSystems/OpenSSL-Pod SocketRocket: :commit: 28035e1a98a427853e4038ff1b70479fa8374cfa :git: https://github.com/facebook/SocketRocket.git SPEC CHECKSUMS: - 25519: dc4bad7e2dbcbf1efa121068a705a44cd98c80fc AFNetworking: 5e0e199f73d8626b11e79750991f5d173d1f8b67 ATAppUpdater: a9f7027060959d47e58733d3b48f6b9a28cb8de1 - AxolotlKit: ba0ab24b879d34559a68e1270b079cc9bd7b3417 + AxolotlKit: 7cfd2e71329b8dc398734e95b936450a2081fd60 CocoaLumberjack: aa9dcab71bdf9eaf2a63bbd9ddc87863efe45457 - HKDFKit: c058305d6f64b84f28c50bd7aa89574625bcb62a + Curve25519Kit: 76d0859ecb34704f7732847812363f83b23a6a59 + GRKOpenSSLFramework: 39829d7b30f95133301f44514d4d7c070961e9f8 + HKDFKit: 3fb424060aaf69795bc8ab34c4c233b98dc6303b JSQMessagesViewController: 39fed975e3c9f8eba7292071e29eeb541d105e66 JSQSystemSoundPlayer: c5850e77a4363ffd374cd851154b9af93264ed8d libPhoneNumber-iOS: f721ae4d5854bce60934f9fb9b0b28e8e68913cb Mantle: 2fa750afa478cd625a94230fbf1c13462f29395b - OpenSSL: 336ec50b5bc20b52dcd16cb1dd196f617d841e49 ProtocolBuffers: d509225eb2ea43d9582a59e94348fcf86e2abd65 PureLayout: 4d550abe49a94f24c2808b9b95db9131685fe4cd Reachability: 33e18b67625424e47b6cde6d202dce689ad7af96 SAMKeychain: 483e1c9f32984d50ca961e26818a534283b4cd5c - SignalServiceKit: b84d80de0bfd5f863994a1ce1f5b742b91c46cb5 + SignalServiceKit: c56f5dfdfa2e77c26b231c351c1ba458e7b94541 SocketRocket: dbb1554b8fc288ef8ef370d6285aeca7361be31e SQLCipher: 43d12c0eb9c57fb438749618fc3ce0065509a559 TwistedOakCollapsingFutures: f359b90f203e9ab13dfb92c9ff41842a7fe1cd0c @@ -178,6 +188,6 @@ SPEC CHECKSUMS: YapDatabase: cd911121580ff16675f65ad742a9eb0ab4d9e266 YYImage: 1e1b62a9997399593e4b9c4ecfbbabbf1d3f3b54 -PODFILE CHECKSUM: f4fae6cdf4f646cae494d89c98fe225f455836fe +PODFILE CHECKSUM: 8e42a06de2d254e448580cfd6212545739de62d6 COCOAPODS: 1.3.1 diff --git a/Signal.xcodeproj/project.pbxproj b/Signal.xcodeproj/project.pbxproj index dd8fd3393..4a722fcfb 100644 --- a/Signal.xcodeproj/project.pbxproj +++ b/Signal.xcodeproj/project.pbxproj @@ -7,7 +7,7 @@ objects = { /* Begin PBXBuildFile section */ - 1C08FF1D425152263FA4A34F /* libPods-SignalShareExtension.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1887AA0D47FC18AB4F5B9189 /* libPods-SignalShareExtension.a */; }; + 2AE2882E4C2B96BFFF9EE27C /* Pods_SignalShareExtension.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0F94C85CB0B235DA37F68ED0 /* Pods_SignalShareExtension.framework */; }; 3400C7931EAF89CD008A8584 /* SendExternalFileViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 3400C7911EAF89CD008A8584 /* SendExternalFileViewController.m */; }; 3400C7961EAF99F4008A8584 /* SelectThreadViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 3400C7951EAF99F4008A8584 /* SelectThreadViewController.m */; }; 3400C7991EAFB772008A8584 /* ThreadViewHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = 3400C7981EAFB772008A8584 /* ThreadViewHelper.m */; }; @@ -269,7 +269,6 @@ 45FBC5C91DF8575700E9B410 /* CallKitCallManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 45FBC59A1DF8575700E9B410 /* CallKitCallManager.swift */; }; 45FBC5D11DF8592E00E9B410 /* SignalCall.swift in Sources */ = {isa = PBXBuildFile; fileRef = 45FBC5D01DF8592E00E9B410 /* SignalCall.swift */; }; 45FBC5D21DF8592E00E9B410 /* SignalCall.swift in Sources */ = {isa = PBXBuildFile; fileRef = 45FBC5D01DF8592E00E9B410 /* SignalCall.swift */; }; - 56EAA22E1901718F78C6DBB4 /* libPods-SignalTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1B5E7D6C9007F5E5761D79DD /* libPods-SignalTests.a */; }; 70377AAB1918450100CAF501 /* MobileCoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 70377AAA1918450100CAF501 /* MobileCoreServices.framework */; }; 7038632718F70C0700D4A43F /* CryptoTools.m in Sources */ = {isa = PBXBuildFile; fileRef = 7038632418F70C0700D4A43F /* CryptoTools.m */; }; 768A1A2B17FC9CD300E00ED8 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 768A1A2A17FC9CD300E00ED8 /* libz.dylib */; }; @@ -363,6 +362,8 @@ B90418E6183E9DD40038554A /* DateUtil.m in Sources */ = {isa = PBXBuildFile; fileRef = B90418E5183E9DD40038554A /* DateUtil.m */; }; B97940271832BD2400BD66CB /* UIUtil.m in Sources */ = {isa = PBXBuildFile; fileRef = B97940261832BD2400BD66CB /* UIUtil.m */; }; B9EB5ABD1884C002007CBB57 /* MessageUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B9EB5ABC1884C002007CBB57 /* MessageUI.framework */; }; + BFF3FB9730634F37D25903F4 /* Pods_Signal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D17BB5C25D615AB49813100C /* Pods_Signal.framework */; }; + CC875800737563D6891B741D /* Pods_SignalTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 748A5CAEDD7C919FC64C6807 /* Pods_SignalTests.framework */; }; D202868116DBE0E7009068E9 /* CFNetwork.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D2AEACDB16C426DA00C364C0 /* CFNetwork.framework */; }; D202868216DBE0F4009068E9 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D2179CFD16BB0B480006F3AB /* SystemConfiguration.framework */; }; D202868316DBE0FC009068E9 /* CoreTelephony.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D2179CFB16BB0B3A0006F3AB /* CoreTelephony.framework */; }; @@ -383,7 +384,6 @@ E1370BE418A0686C00826894 /* outring.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = E18AB40B18A05754001A532A /* outring.mp3 */; }; E1370BE518A0686C00826894 /* r.caf in Resources */ = {isa = PBXBuildFile; fileRef = E18AB40C18A05754001A532A /* r.caf */; }; E1370BE618A0686C00826894 /* sonarping.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = E18AB40D18A05754001A532A /* sonarping.mp3 */; }; - E32B0699162419B7046BC643 /* libPods-Signal.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 7DB8EE72F8522189E3E2CB45 /* libPods-Signal.a */; }; EF764C351DB67CC5000D9A87 /* UIViewController+Permissions.m in Sources */ = {isa = PBXBuildFile; fileRef = EF764C341DB67CC5000D9A87 /* UIViewController+Permissions.m */; }; FC3BD9881A30A790005B96BB /* Social.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FC3BD9871A30A790005B96BB /* Social.framework */; }; FC5CDF391A3393DD00B47253 /* error_white@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = FC5CDF371A3393DD00B47253 /* error_white@2x.png */; }; @@ -445,8 +445,7 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ - 1887AA0D47FC18AB4F5B9189 /* libPods-SignalShareExtension.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-SignalShareExtension.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - 1B5E7D6C9007F5E5761D79DD /* libPods-SignalTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-SignalTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 0F94C85CB0B235DA37F68ED0 /* Pods_SignalShareExtension.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SignalShareExtension.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 1C93CF3971B64E8B6C1F9AC1 /* Pods-SignalShareExtension.test.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SignalShareExtension.test.xcconfig"; path = "Pods/Target Support Files/Pods-SignalShareExtension/Pods-SignalShareExtension.test.xcconfig"; sourceTree = ""; }; 1CE3CD5C23334683BDD3D78C /* Pods-Signal.test.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Signal.test.xcconfig"; path = "Pods/Target Support Files/Pods-Signal/Pods-Signal.test.xcconfig"; sourceTree = ""; }; 34009B651EC4CB11001D95D1 /* OWSMath.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OWSMath.h; sourceTree = ""; }; @@ -788,6 +787,7 @@ 70377AAA1918450100CAF501 /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = System/Library/Frameworks/MobileCoreServices.framework; sourceTree = SDKROOT; }; 7038632318F70C0700D4A43F /* CryptoTools.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CryptoTools.h; sourceTree = ""; }; 7038632418F70C0700D4A43F /* CryptoTools.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CryptoTools.m; sourceTree = ""; }; + 748A5CAEDD7C919FC64C6807 /* Pods_SignalTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SignalTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 768A1A2A17FC9CD300E00ED8 /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = usr/lib/libz.dylib; sourceTree = SDKROOT; }; 76C87F18181EFCE600C4ACAB /* MediaPlayer.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MediaPlayer.framework; path = System/Library/Frameworks/MediaPlayer.framework; sourceTree = SDKROOT; }; 76EB03C218170B33006006FC /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; @@ -811,7 +811,6 @@ 76EB04FB18170B33006006FC /* Util.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Util.h; sourceTree = ""; }; 76EB052E18170B33006006FC /* ContactTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ContactTableViewCell.h; sourceTree = ""; }; 76EB052F18170B33006006FC /* ContactTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ContactTableViewCell.m; sourceTree = ""; }; - 7DB8EE72F8522189E3E2CB45 /* libPods-Signal.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Signal.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 8981C8F64D94D3C52EB67A2C /* Pods-SignalTests.test.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SignalTests.test.xcconfig"; path = "Pods/Target Support Files/Pods-SignalTests/Pods-SignalTests.test.xcconfig"; sourceTree = ""; }; 954AEE681DF33D32002E5410 /* ContactsPickerTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ContactsPickerTest.swift; sourceTree = ""; }; A11CD70C17FA230600A2D1B1 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; @@ -915,6 +914,7 @@ B97940251832BD2400BD66CB /* UIUtil.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIUtil.h; sourceTree = ""; }; B97940261832BD2400BD66CB /* UIUtil.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UIUtil.m; sourceTree = ""; }; B9EB5ABC1884C002007CBB57 /* MessageUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MessageUI.framework; path = System/Library/Frameworks/MessageUI.framework; sourceTree = SDKROOT; }; + D17BB5C25D615AB49813100C /* Pods_Signal.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Signal.framework; sourceTree = BUILT_PRODUCTS_DIR; }; D2179CFB16BB0B3A0006F3AB /* CoreTelephony.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreTelephony.framework; path = System/Library/Frameworks/CoreTelephony.framework; sourceTree = SDKROOT; }; D2179CFD16BB0B480006F3AB /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; }; D221A089169C9E5E00537ABF /* Signal.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Signal.app; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -958,7 +958,7 @@ buildActionMask = 2147483647; files = ( 453518A21FC63E2900210559 /* SignalMessaging.framework in Frameworks */, - 1C08FF1D425152263FA4A34F /* libPods-SignalShareExtension.a in Frameworks */, + 2AE2882E4C2B96BFFF9EE27C /* Pods_SignalShareExtension.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1000,7 +1000,7 @@ D221A090169C9E5E00537ABF /* Foundation.framework in Frameworks */, D221A0E8169DFFC500537ABF /* AVFoundation.framework in Frameworks */, D24B5BD5169F568C00681372 /* AudioToolbox.framework in Frameworks */, - E32B0699162419B7046BC643 /* libPods-Signal.a in Frameworks */, + BFF3FB9730634F37D25903F4 /* Pods_Signal.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1023,7 +1023,7 @@ D202868116DBE0E7009068E9 /* CFNetwork.framework in Frameworks */, D221A0AD169C9E5F00537ABF /* UIKit.framework in Frameworks */, D221A0AE169C9E5F00537ABF /* Foundation.framework in Frameworks */, - 56EAA22E1901718F78C6DBB4 /* libPods-SignalTests.a in Frameworks */, + CC875800737563D6891B741D /* Pods_SignalTests.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1830,9 +1830,9 @@ D221A08D169C9E5E00537ABF /* UIKit.framework */, D221A08F169C9E5E00537ABF /* Foundation.framework */, D221A091169C9E5E00537ABF /* CoreGraphics.framework */, - 7DB8EE72F8522189E3E2CB45 /* libPods-Signal.a */, - 1B5E7D6C9007F5E5761D79DD /* libPods-SignalTests.a */, - 1887AA0D47FC18AB4F5B9189 /* libPods-SignalShareExtension.a */, + D17BB5C25D615AB49813100C /* Pods_Signal.framework */, + 0F94C85CB0B235DA37F68ED0 /* Pods_SignalShareExtension.framework */, + 748A5CAEDD7C919FC64C6807 /* Pods_SignalTests.framework */, ); name = Frameworks; sourceTree = ""; @@ -2327,9 +2327,54 @@ files = ( ); inputPaths = ( + "${SRCROOT}/Pods/Target Support Files/Pods-Signal/Pods-Signal-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/AFNetworking/AFNetworking.framework", + "${BUILT_PRODUCTS_DIR}/ATAppUpdater/ATAppUpdater.framework", + "${BUILT_PRODUCTS_DIR}/AxolotlKit/AxolotlKit.framework", + "${BUILT_PRODUCTS_DIR}/CocoaLumberjack/CocoaLumberjack.framework", + "${BUILT_PRODUCTS_DIR}/Curve25519Kit/Curve25519Kit.framework", + "${PODS_ROOT}/GRKOpenSSLFramework/OpenSSL-iOS/bin/openssl.framework", + "${BUILT_PRODUCTS_DIR}/HKDFKit/HKDFKit.framework", + "${BUILT_PRODUCTS_DIR}/JSQMessagesViewController/JSQMessagesViewController.framework", + "${BUILT_PRODUCTS_DIR}/JSQSystemSoundPlayer/JSQSystemSoundPlayer.framework", + "${BUILT_PRODUCTS_DIR}/Mantle/Mantle.framework", + "${BUILT_PRODUCTS_DIR}/ProtocolBuffers/ProtocolBuffers.framework", + "${BUILT_PRODUCTS_DIR}/PureLayout/PureLayout.framework", + "${BUILT_PRODUCTS_DIR}/Reachability/Reachability.framework", + "${BUILT_PRODUCTS_DIR}/SAMKeychain/SAMKeychain.framework", + "${BUILT_PRODUCTS_DIR}/SQLCipher/SQLCipher.framework", + "${BUILT_PRODUCTS_DIR}/SignalServiceKit/SignalServiceKit.framework", + "${BUILT_PRODUCTS_DIR}/SocketRocket/SocketRocket.framework", + "${BUILT_PRODUCTS_DIR}/TwistedOakCollapsingFutures/TwistedOakCollapsingFutures.framework", + "${BUILT_PRODUCTS_DIR}/UnionFind/UnionFind.framework", + "${BUILT_PRODUCTS_DIR}/YYImage/YYImage.framework", + "${BUILT_PRODUCTS_DIR}/YapDatabase/YapDatabase.framework", + "${BUILT_PRODUCTS_DIR}/libPhoneNumber-iOS/libPhoneNumber_iOS.framework", ); name = "[CP] Embed Pods Frameworks"; outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/AFNetworking.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ATAppUpdater.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/AxolotlKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CocoaLumberjack.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Curve25519Kit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/openssl.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HKDFKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/JSQMessagesViewController.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/JSQSystemSoundPlayer.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Mantle.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ProtocolBuffers.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/PureLayout.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Reachability.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SAMKeychain.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SQLCipher.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SignalServiceKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SocketRocket.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/TwistedOakCollapsingFutures.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/UnionFind.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/YYImage.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/YapDatabase.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/libPhoneNumber_iOS.framework", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; @@ -2846,11 +2891,7 @@ "DEBUG=1", "$(inherited)", ); - "GCC_PREPROCESSOR_DEFINITIONS[arch=*]" = ( - "DEBUG=1", - "$(inherited)", - "SSK_BUILDING_FOR_TESTS=1", - ); + "GCC_PREPROCESSOR_DEFINITIONS[arch=*]" = "DEBUG=1 $(inherited) SSK_BUILDING_FOR_TESTS=1"; GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES; GCC_TREAT_INCOMPATIBLE_POINTER_TYPE_WARNINGS_AS_ERRORS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; diff --git a/Signal.xcodeproj/xcshareddata/xcschemes/Signal.xcscheme b/Signal.xcodeproj/xcshareddata/xcschemes/Signal.xcscheme index 9eb66f2b5..6b2669540 100644 --- a/Signal.xcodeproj/xcshareddata/xcschemes/Signal.xcscheme +++ b/Signal.xcodeproj/xcshareddata/xcschemes/Signal.xcscheme @@ -28,8 +28,8 @@ buildForAnalyzing = "YES"> diff --git a/Signal/src/Jobs/MessageFetcherJob.swift b/Signal/src/Jobs/MessageFetcherJob.swift index fe16808e6..d40dabbf0 100644 --- a/Signal/src/Jobs/MessageFetcherJob.swift +++ b/Signal/src/Jobs/MessageFetcherJob.swift @@ -4,6 +4,7 @@ import Foundation import PromiseKit +import SignalServiceKit @objc(OWSMessageFetcherJob) class MessageFetcherJob: NSObject { diff --git a/Signal/src/Jobs/SessionResetJob.swift b/Signal/src/Jobs/SessionResetJob.swift index e4ad59351..91ec7ea94 100644 --- a/Signal/src/Jobs/SessionResetJob.swift +++ b/Signal/src/Jobs/SessionResetJob.swift @@ -4,6 +4,7 @@ import Foundation import PromiseKit +import SignalServiceKit @objc(OWSSessionResetJob) class SessionResetJob: NSObject { diff --git a/Signal/src/MessageSender+Promise.swift b/Signal/src/MessageSender+Promise.swift index 751ab6f78..a7cceb7c4 100644 --- a/Signal/src/MessageSender+Promise.swift +++ b/Signal/src/MessageSender+Promise.swift @@ -4,6 +4,7 @@ import Foundation import PromiseKit +import SignalServiceKit public extension MessageSender { diff --git a/Signal/src/Models/AccountManager.swift b/Signal/src/Models/AccountManager.swift index 86e354534..a779a56cd 100644 --- a/Signal/src/Models/AccountManager.swift +++ b/Signal/src/Models/AccountManager.swift @@ -4,6 +4,7 @@ import Foundation import PromiseKit +import SignalServiceKit /** * Signal is actually two services - textSecure for messages and red phone (for calls). diff --git a/Signal/src/Models/CompareSafetyNumbersActivity.swift b/Signal/src/Models/CompareSafetyNumbersActivity.swift index fad060fb4..cc11d1e5d 100644 --- a/Signal/src/Models/CompareSafetyNumbersActivity.swift +++ b/Signal/src/Models/CompareSafetyNumbersActivity.swift @@ -3,6 +3,7 @@ // import Foundation +import SignalServiceKit let CompareSafetyNumbersActivityType = "org.whispersystems.signal.activity.CompareSafetyNumbers" diff --git a/Signal/src/Models/SignalAttachment.swift b/Signal/src/Models/SignalAttachment.swift index 7cac391d2..42e3dff25 100644 --- a/Signal/src/Models/SignalAttachment.swift +++ b/Signal/src/Models/SignalAttachment.swift @@ -4,6 +4,7 @@ import Foundation import MobileCoreServices +import SignalServiceKit enum SignalAttachmentError: Error { case missingData diff --git a/Signal/src/Models/SyncPushTokensJob.swift b/Signal/src/Models/SyncPushTokensJob.swift index 68d8bfebe..043f57004 100644 --- a/Signal/src/Models/SyncPushTokensJob.swift +++ b/Signal/src/Models/SyncPushTokensJob.swift @@ -3,6 +3,7 @@ // import PromiseKit +import SignalServiceKit @objc(OWSSyncPushTokensJob) class SyncPushTokensJob: NSObject { diff --git a/Signal/src/MultiDeviceProfileKeyUpdateJob.swift b/Signal/src/MultiDeviceProfileKeyUpdateJob.swift index 406e662a4..b5262fe2a 100644 --- a/Signal/src/MultiDeviceProfileKeyUpdateJob.swift +++ b/Signal/src/MultiDeviceProfileKeyUpdateJob.swift @@ -4,6 +4,7 @@ import Foundation import PromiseKit +import SignalServiceKit /** * Used to distribute our profile key to legacy linked devices, newly linked devices will have our profile key as part of provisioning. diff --git a/Signal/src/OWSMessagesBubbleImageFactory.swift b/Signal/src/OWSMessagesBubbleImageFactory.swift index 99cebb4cb..1586287b4 100644 --- a/Signal/src/OWSMessagesBubbleImageFactory.swift +++ b/Signal/src/OWSMessagesBubbleImageFactory.swift @@ -3,6 +3,8 @@ // import Foundation +import JSQMessagesViewController +import SignalServiceKit @objc class OWSMessagesBubbleImageFactory: NSObject { diff --git a/Signal/src/Profiles/ProfileFetcherJob.swift b/Signal/src/Profiles/ProfileFetcherJob.swift index 0a8119c8d..219cb1faf 100644 --- a/Signal/src/Profiles/ProfileFetcherJob.swift +++ b/Signal/src/Profiles/ProfileFetcherJob.swift @@ -4,6 +4,7 @@ import Foundation import PromiseKit +import SignalServiceKit @objc class ProfileFetcherJob: NSObject { diff --git a/Signal/src/Signal-Bridging-Header.h b/Signal/src/Signal-Bridging-Header.h index 9b955a4b6..375b35647 100644 --- a/Signal/src/Signal-Bridging-Header.h +++ b/Signal/src/Signal-Bridging-Header.h @@ -48,7 +48,7 @@ #import #import #import -#import +#import #import #import #import diff --git a/Signal/src/ViewControllers/CallViewController.swift b/Signal/src/ViewControllers/CallViewController.swift index 21a3984e5..9a7bec8d9 100644 --- a/Signal/src/ViewControllers/CallViewController.swift +++ b/Signal/src/ViewControllers/CallViewController.swift @@ -5,6 +5,7 @@ import Foundation import WebRTC import PromiseKit +import SignalServiceKit // TODO: Add category so that button handlers can be defined where button is created. // TODO: Ensure buttons enabled & disabled as necessary. diff --git a/Signal/src/ViewControllers/ContactsPicker.swift b/Signal/src/ViewControllers/ContactsPicker.swift index 3ae37a706..ce99a980a 100644 --- a/Signal/src/ViewControllers/ContactsPicker.swift +++ b/Signal/src/ViewControllers/ContactsPicker.swift @@ -9,6 +9,7 @@ import UIKit import Contacts +import SignalServiceKit @available(iOS 9.0, *) public protocol ContactsPickerDelegate { diff --git a/Signal/src/ViewControllers/ConversationView/ConversationViewController.m b/Signal/src/ViewControllers/ConversationView/ConversationViewController.m index c64e4f0db..ef99350a5 100644 --- a/Signal/src/ViewControllers/ConversationView/ConversationViewController.m +++ b/Signal/src/ViewControllers/ConversationView/ConversationViewController.m @@ -63,7 +63,7 @@ #import #import #import -#import +#import #import #import #import diff --git a/Signal/src/ViewControllers/DebugUI/DebugUICalling.swift b/Signal/src/ViewControllers/DebugUI/DebugUICalling.swift index 462d68a81..d5fb213b0 100644 --- a/Signal/src/ViewControllers/DebugUI/DebugUICalling.swift +++ b/Signal/src/ViewControllers/DebugUI/DebugUICalling.swift @@ -3,6 +3,7 @@ // import Foundation +import SignalServiceKit class DebugUICalling: DebugUIPage { diff --git a/Signal/src/ViewControllers/DebugUI/DebugUIMessages.m b/Signal/src/ViewControllers/DebugUI/DebugUIMessages.m index 0110c41e2..c8799987a 100644 --- a/Signal/src/ViewControllers/DebugUI/DebugUIMessages.m +++ b/Signal/src/ViewControllers/DebugUI/DebugUIMessages.m @@ -8,7 +8,7 @@ #import "OWSTableViewController.h" #import "Signal-Swift.h" #import "ThreadUtil.h" -#import <25519/Randomness.h> +#import #import #import #import diff --git a/Signal/src/ViewControllers/DebugUI/DebugUIProfile.swift b/Signal/src/ViewControllers/DebugUI/DebugUIProfile.swift index eade8157b..748b144fe 100644 --- a/Signal/src/ViewControllers/DebugUI/DebugUIProfile.swift +++ b/Signal/src/ViewControllers/DebugUI/DebugUIProfile.swift @@ -3,6 +3,7 @@ // import Foundation +import SignalServiceKit class DebugUIProfile: DebugUIPage { diff --git a/Signal/src/ViewControllers/DebugUI/DebugUISyncMessages.m b/Signal/src/ViewControllers/DebugUI/DebugUISyncMessages.m index 319a344b2..b55efe54f 100644 --- a/Signal/src/ViewControllers/DebugUI/DebugUISyncMessages.m +++ b/Signal/src/ViewControllers/DebugUI/DebugUISyncMessages.m @@ -8,7 +8,7 @@ #import "OWSTableViewController.h" #import "Signal-Swift.h" #import "ThreadUtil.h" -#import <25519/Randomness.h> +#import #import #import #import diff --git a/Signal/src/ViewControllers/GifPicker/GifPickerCell.swift b/Signal/src/ViewControllers/GifPicker/GifPickerCell.swift index 7f32c29e4..c910d319c 100644 --- a/Signal/src/ViewControllers/GifPicker/GifPickerCell.swift +++ b/Signal/src/ViewControllers/GifPicker/GifPickerCell.swift @@ -4,6 +4,8 @@ import Foundation import PromiseKit +import SignalServiceKit +import YYImage class GifPickerCell: UICollectionViewCell { let TAG = "[GifPickerCell]" diff --git a/Signal/src/ViewControllers/GifPicker/GifPickerViewController.swift b/Signal/src/ViewControllers/GifPicker/GifPickerViewController.swift index c5fc7c584..17452f054 100644 --- a/Signal/src/ViewControllers/GifPicker/GifPickerViewController.swift +++ b/Signal/src/ViewControllers/GifPicker/GifPickerViewController.swift @@ -3,6 +3,8 @@ // import Foundation +import SignalServiceKit +import Reachability @objc protocol GifPickerViewControllerDelegate: class { diff --git a/Signal/src/ViewControllers/InviteFlow.swift b/Signal/src/ViewControllers/InviteFlow.swift index aacf720ae..f8cc8d821 100644 --- a/Signal/src/ViewControllers/InviteFlow.swift +++ b/Signal/src/ViewControllers/InviteFlow.swift @@ -6,6 +6,7 @@ import Foundation import Social import ContactsUI import MessageUI +import SignalServiceKit @objc(OWSInviteFlow) class InviteFlow: NSObject, MFMessageComposeViewControllerDelegate, MFMailComposeViewControllerDelegate, ContactsPickerDelegate { diff --git a/Signal/src/ViewControllers/MediaMessageView.swift b/Signal/src/ViewControllers/MediaMessageView.swift index 5f4fdd20b..a4e5a8e36 100644 --- a/Signal/src/ViewControllers/MediaMessageView.swift +++ b/Signal/src/ViewControllers/MediaMessageView.swift @@ -4,6 +4,8 @@ import Foundation import MediaPlayer +import YYImage +import SignalServiceKit @objc enum MediaMessageViewMode: UInt { diff --git a/Signal/src/ViewControllers/MessageDetailViewController.swift b/Signal/src/ViewControllers/MessageDetailViewController.swift index d9e0ec686..efaa3f405 100644 --- a/Signal/src/ViewControllers/MessageDetailViewController.swift +++ b/Signal/src/ViewControllers/MessageDetailViewController.swift @@ -3,6 +3,7 @@ // import Foundation +import SignalServiceKit @objc enum MessageMetadataViewMode: UInt { diff --git a/Signal/src/ViewControllers/ModalActivityIndicatorViewController.swift b/Signal/src/ViewControllers/ModalActivityIndicatorViewController.swift index 3398e2f35..aa60ffe40 100644 --- a/Signal/src/ViewControllers/ModalActivityIndicatorViewController.swift +++ b/Signal/src/ViewControllers/ModalActivityIndicatorViewController.swift @@ -4,6 +4,7 @@ import Foundation import MediaPlayer +import SignalServiceKit // A modal view that be used during blocking interactions (e.g. waiting on response from // service or on the completion of a long-running local operation). diff --git a/Signal/src/ViewControllers/OWSConversationSettingsViewController.m b/Signal/src/ViewControllers/OWSConversationSettingsViewController.m index 73e7b1ee7..8da25bb3c 100644 --- a/Signal/src/ViewControllers/OWSConversationSettingsViewController.m +++ b/Signal/src/ViewControllers/OWSConversationSettingsViewController.m @@ -19,7 +19,7 @@ #import "UIUtil.h" #import "UIView+OWS.h" #import "UpdateGroupViewController.h" -#import <25519/Curve25519.h> +#import #import #import #import diff --git a/Signal/src/ViewControllers/SafetyNumberConfirmationAlert.swift b/Signal/src/ViewControllers/SafetyNumberConfirmationAlert.swift index 044f02b66..129a2fcd9 100644 --- a/Signal/src/ViewControllers/SafetyNumberConfirmationAlert.swift +++ b/Signal/src/ViewControllers/SafetyNumberConfirmationAlert.swift @@ -3,6 +3,7 @@ // import Foundation +import SignalServiceKit class SafetyNumberConfirmationAlert: NSObject { diff --git a/Signal/src/ViewControllers/Utils/MessageRecipientStatusUtils.swift b/Signal/src/ViewControllers/Utils/MessageRecipientStatusUtils.swift index f37dcb232..93981a138 100644 --- a/Signal/src/ViewControllers/Utils/MessageRecipientStatusUtils.swift +++ b/Signal/src/ViewControllers/Utils/MessageRecipientStatusUtils.swift @@ -3,6 +3,7 @@ // import Foundation +import SignalServiceKit @objc enum MessageRecipientStatus: Int { case uploading diff --git a/Signal/src/call/CallAudioService.swift b/Signal/src/call/CallAudioService.swift index 1585befbc..d6fe6cfdc 100644 --- a/Signal/src/call/CallAudioService.swift +++ b/Signal/src/call/CallAudioService.swift @@ -4,6 +4,7 @@ import Foundation import AVFoundation +import SignalServiceKit public let CallAudioServiceSessionChanged = Notification.Name("CallAudioServiceSessionChanged") diff --git a/Signal/src/call/CallService.swift b/Signal/src/call/CallService.swift index c50d966da..a285e3de7 100644 --- a/Signal/src/call/CallService.swift +++ b/Signal/src/call/CallService.swift @@ -5,6 +5,7 @@ import Foundation import PromiseKit import WebRTC +import SignalServiceKit /** * `CallService` is a global singleton that manages the state of WebRTC-backed Signal Calls diff --git a/Signal/src/call/NonCallKitCallUIAdaptee.swift b/Signal/src/call/NonCallKitCallUIAdaptee.swift index cf225e255..5fd87c466 100644 --- a/Signal/src/call/NonCallKitCallUIAdaptee.swift +++ b/Signal/src/call/NonCallKitCallUIAdaptee.swift @@ -3,6 +3,7 @@ // import Foundation +import SignalServiceKit /** * Manage call related UI in a pre-CallKit world. diff --git a/Signal/src/call/OutboundCallInitiator.swift b/Signal/src/call/OutboundCallInitiator.swift index 1138082cb..db6eeebed 100644 --- a/Signal/src/call/OutboundCallInitiator.swift +++ b/Signal/src/call/OutboundCallInitiator.swift @@ -3,6 +3,7 @@ // import Foundation +import SignalServiceKit /** * Creates an outbound call via WebRTC. diff --git a/Signal/src/call/PeerConnectionClient.swift b/Signal/src/call/PeerConnectionClient.swift index 0edb31c66..e26650388 100644 --- a/Signal/src/call/PeerConnectionClient.swift +++ b/Signal/src/call/PeerConnectionClient.swift @@ -5,6 +5,7 @@ import Foundation import PromiseKit import WebRTC +import SignalServiceKit // HACK - Seeing crazy SEGFAULTs on iOS9 when accessing these objc externs. // iOS10 seems unaffected. Reproducible for ~1 in 3 calls. diff --git a/Signal/src/call/SignalCall.swift b/Signal/src/call/SignalCall.swift index e76a821f4..49084000b 100644 --- a/Signal/src/call/SignalCall.swift +++ b/Signal/src/call/SignalCall.swift @@ -3,6 +3,7 @@ // import Foundation +import SignalServiceKit enum CallState: String { case idle diff --git a/Signal/src/call/Speakerbox/CallKitCallManager.swift b/Signal/src/call/Speakerbox/CallKitCallManager.swift index 251b5bc66..3c91e18f5 100644 --- a/Signal/src/call/Speakerbox/CallKitCallManager.swift +++ b/Signal/src/call/Speakerbox/CallKitCallManager.swift @@ -4,6 +4,7 @@ import UIKit import CallKit +import SignalServiceKit /** * Requests actions from CallKit diff --git a/Signal/src/call/Speakerbox/CallKitCallUIAdaptee.swift b/Signal/src/call/Speakerbox/CallKitCallUIAdaptee.swift index 83a9fa41b..ee3164050 100644 --- a/Signal/src/call/Speakerbox/CallKitCallUIAdaptee.swift +++ b/Signal/src/call/Speakerbox/CallKitCallUIAdaptee.swift @@ -6,6 +6,7 @@ import Foundation import UIKit import CallKit import AVFoundation +import SignalServiceKit /** * Connects user interface to the CallService using CallKit. diff --git a/Signal/src/call/UserInterface/CallUIAdapter.swift b/Signal/src/call/UserInterface/CallUIAdapter.swift index 215745ced..605e0d7cb 100644 --- a/Signal/src/call/UserInterface/CallUIAdapter.swift +++ b/Signal/src/call/UserInterface/CallUIAdapter.swift @@ -5,6 +5,7 @@ import Foundation import PromiseKit import CallKit +import SignalServiceKit import WebRTC protocol CallUIAdaptee { diff --git a/Signal/src/call/WebRTCCallMessageHandler.swift b/Signal/src/call/WebRTCCallMessageHandler.swift index 304c2a739..238edd106 100644 --- a/Signal/src/call/WebRTCCallMessageHandler.swift +++ b/Signal/src/call/WebRTCCallMessageHandler.swift @@ -3,6 +3,7 @@ // import Foundation +import SignalServiceKit @objc(OWSWebRTCCallMessageHandler) class WebRTCCallMessageHandler: NSObject, OWSCallMessageHandler { diff --git a/Signal/src/contact/OWSContactsManager.h b/Signal/src/contact/OWSContactsManager.h index fadb35f2b..0ae470485 100644 --- a/Signal/src/contact/OWSContactsManager.h +++ b/Signal/src/contact/OWSContactsManager.h @@ -2,7 +2,7 @@ // Copyright (c) 2017 Open Whisper Systems. All rights reserved. // -#import "Contact.h" +#import #import NS_ASSUME_NONNULL_BEGIN diff --git a/Signal/src/contact/SystemContactsFetcher.swift b/Signal/src/contact/SystemContactsFetcher.swift index 5ee7de358..cd45cc486 100644 --- a/Signal/src/contact/SystemContactsFetcher.swift +++ b/Signal/src/contact/SystemContactsFetcher.swift @@ -5,6 +5,7 @@ import Foundation import Contacts import ContactsUI +import SignalServiceKit enum Result { case success(T) diff --git a/Signal/src/environment/Environment.h b/Signal/src/environment/Environment.h index 7009f0200..be3187d7d 100644 --- a/Signal/src/environment/Environment.h +++ b/Signal/src/environment/Environment.h @@ -3,7 +3,7 @@ // #import "OWSPreferences.h" -#import "TSStorageHeaders.h" +#import /** * diff --git a/Signal/src/environment/Environment.m b/Signal/src/environment/Environment.m index d575e09e3..323bbc3cf 100644 --- a/Signal/src/environment/Environment.m +++ b/Signal/src/environment/Environment.m @@ -5,7 +5,6 @@ #import "Environment.h" #import "ConversationViewController.h" #import "DebugLogger.h" -#import "FunctionalUtil.h" #import "HomeViewController.h" #import "Signal-Swift.h" #import "SignalKeyingStorage.h" diff --git a/Signal/src/environment/ExperienceUpgradeFinder.swift b/Signal/src/environment/ExperienceUpgradeFinder.swift index 0641b960e..d4bc51390 100644 --- a/Signal/src/environment/ExperienceUpgradeFinder.swift +++ b/Signal/src/environment/ExperienceUpgradeFinder.swift @@ -3,6 +3,7 @@ // import Foundation +import SignalServiceKit enum ExperienceUpgradeId: String { case videoCalling = "001", diff --git a/Signal/src/environment/ExperienceUpgrades/ExperienceUpgrade.swift b/Signal/src/environment/ExperienceUpgrades/ExperienceUpgrade.swift index 2e86facd7..d94250492 100644 --- a/Signal/src/environment/ExperienceUpgrades/ExperienceUpgrade.swift +++ b/Signal/src/environment/ExperienceUpgrades/ExperienceUpgrade.swift @@ -3,6 +3,7 @@ // import Foundation +import SignalServiceKit class ExperienceUpgrade: TSYapDatabaseObject { let title: String diff --git a/Signal/src/environment/OWS106EnsureProfileComplete.swift b/Signal/src/environment/OWS106EnsureProfileComplete.swift index f18b2584c..db6a2cacf 100644 --- a/Signal/src/environment/OWS106EnsureProfileComplete.swift +++ b/Signal/src/environment/OWS106EnsureProfileComplete.swift @@ -4,6 +4,7 @@ import Foundation import PromiseKit +import SignalServiceKit class OWS106EnsureProfileComplete: OWSDatabaseMigration { diff --git a/Signal/src/environment/PushRegistrationManager.swift b/Signal/src/environment/PushRegistrationManager.swift index 75a5f0d32..45d7ecd65 100644 --- a/Signal/src/environment/PushRegistrationManager.swift +++ b/Signal/src/environment/PushRegistrationManager.swift @@ -5,6 +5,7 @@ import Foundation import PromiseKit import PushKit +import SignalServiceKit public enum PushRegistrationError: Error { case assertionError(description: String) diff --git a/Signal/src/network/GiphyDownloader.swift b/Signal/src/network/GiphyDownloader.swift index a867a729c..051a8303f 100644 --- a/Signal/src/network/GiphyDownloader.swift +++ b/Signal/src/network/GiphyDownloader.swift @@ -4,6 +4,7 @@ import Foundation import ObjectiveC +import SignalServiceKit // Stills should be loaded before full GIFs. enum GiphyRequestPriority { diff --git a/Signal/src/util/DeviceSleepManager.swift b/Signal/src/util/DeviceSleepManager.swift index f2cec63fe..17416ad4e 100644 --- a/Signal/src/util/DeviceSleepManager.swift +++ b/Signal/src/util/DeviceSleepManager.swift @@ -3,6 +3,7 @@ // import Foundation +import SignalServiceKit // This entity has responsibility for blocking the device from sleeping if // certain behaviors (e.g. recording or playing voice messages) are in progress. diff --git a/Signal/src/util/OWSAnalytics.swift b/Signal/src/util/OWSAnalytics.swift index eef57022b..27e91d230 100644 --- a/Signal/src/util/OWSAnalytics.swift +++ b/Signal/src/util/OWSAnalytics.swift @@ -3,6 +3,7 @@ // import Foundation +import SignalServiceKit func FormatAnalyticsLocation(file: String, function: String) -> NSString { return "\((file as NSString).lastPathComponent):\(function)" as NSString diff --git a/Signal/src/util/UIUtil.h b/Signal/src/util/UIUtil.h index b23866af9..ffa754340 100644 --- a/Signal/src/util/UIUtil.h +++ b/Signal/src/util/UIUtil.h @@ -2,7 +2,7 @@ // Copyright (c) 2017 Open Whisper Systems. All rights reserved. // -#import "MIMETypeUtil.h" +#import #import "UIColor+OWS.h" #import "UIFont+OWS.h" #import "UIImage+OWS.h" diff --git a/Signal/src/util/Util.h b/Signal/src/util/Util.h index c875f126c..1c91456e9 100644 --- a/Signal/src/util/Util.h +++ b/Signal/src/util/Util.h @@ -3,7 +3,6 @@ // #import "DateUtil.h" -#import "FunctionalUtil.h" #import "NumberUtil.h" #import "Operation.h" #import "StringUtil.h" diff --git a/Signal/src/views/AttachmentPointerView.swift b/Signal/src/views/AttachmentPointerView.swift index 290610974..817fe0499 100644 --- a/Signal/src/views/AttachmentPointerView.swift +++ b/Signal/src/views/AttachmentPointerView.swift @@ -3,6 +3,7 @@ // import Foundation +import SignalServiceKit class AttachmentPointerView: UIView { diff --git a/Signal/src/views/AudioProgressView.swift b/Signal/src/views/AudioProgressView.swift index 5e0d41749..31ce8a535 100644 --- a/Signal/src/views/AudioProgressView.swift +++ b/Signal/src/views/AudioProgressView.swift @@ -3,6 +3,7 @@ // import UIKit +import SignalServiceKit @objc class AudioProgressView: UIView { diff --git a/Signal/src/views/ContactCell.swift b/Signal/src/views/ContactCell.swift index e424657e2..7b498d0ac 100644 --- a/Signal/src/views/ContactCell.swift +++ b/Signal/src/views/ContactCell.swift @@ -4,6 +4,7 @@ import UIKit import Contacts +import SignalServiceKit @available(iOS 9.0, *) class ContactCell: UITableViewCell { diff --git a/Signal/src/views/GroupTableViewCell.swift b/Signal/src/views/GroupTableViewCell.swift index 7a5c6ac2b..2172e8b45 100644 --- a/Signal/src/views/GroupTableViewCell.swift +++ b/Signal/src/views/GroupTableViewCell.swift @@ -3,6 +3,7 @@ // import UIKit +import SignalServiceKit @objc class GroupTableViewCell: UITableViewCell { diff --git a/Signal/src/views/OWSFlatButton.swift b/Signal/src/views/OWSFlatButton.swift index 8fdfff34f..0bf11786c 100644 --- a/Signal/src/views/OWSFlatButton.swift +++ b/Signal/src/views/OWSFlatButton.swift @@ -3,6 +3,7 @@ // import Foundation +import SignalServiceKit @objc class OWSFlatButton: UIView { let TAG = "[OWSFlatButton]" diff --git a/SignalServiceKit.podspec b/SignalServiceKit.podspec index 8c9bfd872..32a12b4ea 100644 --- a/SignalServiceKit.podspec +++ b/SignalServiceKit.podspec @@ -39,7 +39,7 @@ An Objective-C library for communicating with the Signal messaging service. s.prefix_header_file = 'SignalServiceKit/src/TSPrefix.h' s.xcconfig = { 'OTHER_CFLAGS' => '$(inherited) -DSQLITE_HAS_CODEC' } - s.dependency '25519' + s.dependency 'Curve25519Kit' s.dependency 'CocoaLumberjack' s.dependency 'AFNetworking' s.dependency 'AxolotlKit' @@ -47,7 +47,9 @@ An Objective-C library for communicating with the Signal messaging service. s.dependency 'YapDatabase/SQLCipher', '~> 2.9.3' s.dependency 'SocketRocket' s.dependency 'libPhoneNumber-iOS' - s.dependency 'OpenSSL' + # TODO use framework compatible OpenSSL + #s.dependency 'OpenSSL' + s.dependency 'GRKOpenSSLFramework' s.dependency 'SAMKeychain' s.dependency 'TwistedOakCollapsingFutures' s.dependency 'Reachability' diff --git a/SignalServiceKit/src/Contacts/PhoneNumber.m b/SignalServiceKit/src/Contacts/PhoneNumber.m index b26b6848a..98059a918 100644 --- a/SignalServiceKit/src/Contacts/PhoneNumber.m +++ b/SignalServiceKit/src/Contacts/PhoneNumber.m @@ -4,11 +4,11 @@ #import "PhoneNumber.h" #import "PhoneNumberUtil.h" -#import -#import -#import -#import -#import +#import +#import +#import +#import +#import static NSString *const RPDefaultsKeyPhoneNumberString = @"RPDefaultsKeyPhoneNumberString"; static NSString *const RPDefaultsKeyPhoneNumberCanonical = @"RPDefaultsKeyPhoneNumberCanonical"; diff --git a/SignalServiceKit/src/Contacts/PhoneNumberUtil.h b/SignalServiceKit/src/Contacts/PhoneNumberUtil.h index 88ac2d79a..b4410d481 100644 --- a/SignalServiceKit/src/Contacts/PhoneNumberUtil.h +++ b/SignalServiceKit/src/Contacts/PhoneNumberUtil.h @@ -2,7 +2,7 @@ // Copyright (c) 2017 Open Whisper Systems. All rights reserved. // -#import "NBPhoneNumberUtil.h" +#import #import "PhoneNumber.h" @interface PhoneNumberUtil : NSObject diff --git a/SignalServiceKit/src/Contacts/PhoneNumberUtil.m b/SignalServiceKit/src/Contacts/PhoneNumberUtil.m index 9b0992196..7f0cb3648 100644 --- a/SignalServiceKit/src/Contacts/PhoneNumberUtil.m +++ b/SignalServiceKit/src/Contacts/PhoneNumberUtil.m @@ -4,9 +4,9 @@ #import "PhoneNumberUtil.h" #import "ContactsManagerProtocol.h" -#import "FunctionalUtil.h" #import "Util.h" -#import +#import "FunctionalUtil.h" +#import @interface PhoneNumberUtil () diff --git a/SignalServiceKit/src/Devices/OWSProvisioningCipher.m b/SignalServiceKit/src/Devices/OWSProvisioningCipher.m index 9e23e0903..7206d2446 100644 --- a/SignalServiceKit/src/Devices/OWSProvisioningCipher.m +++ b/SignalServiceKit/src/Devices/OWSProvisioningCipher.m @@ -3,9 +3,10 @@ // #import "OWSProvisioningCipher.h" -#import <25519/Curve25519.h> +#import #import #import +#import NS_ASSUME_NONNULL_BEGIN diff --git a/SignalServiceKit/src/Devices/OWSProvisioningMessage.m b/SignalServiceKit/src/Devices/OWSProvisioningMessage.m index 832759089..2a4609a6b 100644 --- a/SignalServiceKit/src/Devices/OWSProvisioningMessage.m +++ b/SignalServiceKit/src/Devices/OWSProvisioningMessage.m @@ -5,7 +5,7 @@ #import "OWSProvisioningMessage.h" #import "OWSProvisioningCipher.h" #import "OWSProvisioningProtos.pb.h" -#import <25519/Curve25519.h> +#import #import #import diff --git a/SignalServiceKit/src/Messages/OWSIdentityManager.m b/SignalServiceKit/src/Messages/OWSIdentityManager.m index 141057c46..0ce50d4c0 100644 --- a/SignalServiceKit/src/Messages/OWSIdentityManager.m +++ b/SignalServiceKit/src/Messages/OWSIdentityManager.m @@ -19,7 +19,7 @@ #import "TSStorageManager+sessionStore.h" #import "TSStorageManager.h" #import "TextSecureKitEnv.h" -#import <25519/Curve25519.h> +#import #import NS_ASSUME_NONNULL_BEGIN diff --git a/SignalServiceKit/src/Messages/PreKeyBundle+jsonDict.h b/SignalServiceKit/src/Messages/PreKeyBundle+jsonDict.h index 37729e50f..9e3b5fc89 100644 --- a/SignalServiceKit/src/Messages/PreKeyBundle+jsonDict.h +++ b/SignalServiceKit/src/Messages/PreKeyBundle+jsonDict.h @@ -2,7 +2,7 @@ // Copyright (c) 2017 Open Whisper Systems. All rights reserved. // -#import "PreKeyBundle.h" +#import NS_ASSUME_NONNULL_BEGIN diff --git a/SignalServiceKit/src/Network/API/Requests/TSRegisterPrekeysRequest.m b/SignalServiceKit/src/Network/API/Requests/TSRegisterPrekeysRequest.m index 5a8b2038e..8bf641b72 100644 --- a/SignalServiceKit/src/Network/API/Requests/TSRegisterPrekeysRequest.m +++ b/SignalServiceKit/src/Network/API/Requests/TSRegisterPrekeysRequest.m @@ -1,15 +1,11 @@ // -// TSRegisterPrekeys.m -// TextSecureiOS -// -// Created by Christine Corbett Moran on 10/17/13. -// Copyright (c) 2013 Open Whisper Systems. All rights reserved. +// Copyright (c) 2017 Open Whisper Systems. All rights reserved. // #import "TSConstants.h" #import "TSRegisterPrekeysRequest.h" -#import <25519/Curve25519.h> +#import #import #import #import diff --git a/SignalServiceKit/src/Network/API/Requests/TSRegisterSignedPrekeyRequest.m b/SignalServiceKit/src/Network/API/Requests/TSRegisterSignedPrekeyRequest.m index ba9ccfe6c..290aa8716 100644 --- a/SignalServiceKit/src/Network/API/Requests/TSRegisterSignedPrekeyRequest.m +++ b/SignalServiceKit/src/Network/API/Requests/TSRegisterSignedPrekeyRequest.m @@ -5,7 +5,7 @@ #import "TSRegisterSignedPrekeyRequest.h" #import "TSConstants.h" -#import <25519/Curve25519.h> +#import #import #import #import diff --git a/SignalServiceKit/src/Network/WebSockets/TSSocketManager.h b/SignalServiceKit/src/Network/WebSockets/TSSocketManager.h index 69fe44afd..9c2a1aaea 100644 --- a/SignalServiceKit/src/Network/WebSockets/TSSocketManager.h +++ b/SignalServiceKit/src/Network/WebSockets/TSSocketManager.h @@ -2,7 +2,7 @@ // Copyright (c) 2017 Open Whisper Systems. All rights reserved. // -#import "SRWebSocket.h" +#import static void *SocketManagerStateObservationContext = &SocketManagerStateObservationContext; diff --git a/SignalServiceKit/src/Security/CommonCryptorSPI.h b/SignalServiceKit/src/Security/CommonCryptorSPI.h deleted file mode 100644 index 9efbc6afd..000000000 --- a/SignalServiceKit/src/Security/CommonCryptorSPI.h +++ /dev/null @@ -1,397 +0,0 @@ -/* - * Copyright (c) 2010 Apple Inc. All Rights Reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef _CC_CryptorSPI_H_ -#define _CC_CryptorSPI_H_ - -#include -#include -#include - -#include -#ifdef KERNEL -#include -#else -#include -#include -#endif /* KERNEL */ -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* - This is an SPI header. It includes some work in progress implementation notes that - will be removed when this is promoted to an API set. -*/ - -/* - Private Ciphers - */ - -/* Lion SPI name for no padding. Defining for compatibility. Is now - ccNoPadding in CommonCryptor.h - */ - -enum { - ccDefaultPadding = 0, -}; - - -enum { - kCCAlgorithmAES128NoHardware = 20, - kCCAlgorithmAES128WithHardware = 21 -}; - -/* - Private Modes - */ -enum { - kCCModeGCM = 11, - kCCModeCCM = 12, -}; - -/* - Private Paddings - */ -enum { - ccCBCCTS1 = 10, - ccCBCCTS2 = 11, - ccCBCCTS3 = 12, -}; - -/* - Private Cryptor direction (op) - */ -enum { - kCCBoth = 3, -}; - - - - -/* - Supports a mode call of - int mode_setup(int cipher, const unsigned char *IV, const unsigned char *key, int keylen, - const unsigned char *tweak, int tweaklen, int num_rounds, int options, mode_context *ctx); -*/ - -/* User supplied space for the CryptorRef */ - -CCCryptorStatus CCCryptorCreateFromDataWithMode( - CCOperation op, /* kCCEncrypt, kCCEncrypt, kCCBoth (default for BlockMode) */ - CCMode mode, - CCAlgorithm alg, - CCPadding padding, - const void *iv, /* optional initialization vector */ - const void *key, /* raw key material */ - size_t keyLength, - const void *tweak, /* raw tweak material */ - size_t tweakLength, - int numRounds, - CCModeOptions options, - const void *data, /* caller-supplied memory */ - size_t dataLength, /* length of data in bytes */ - CCCryptorRef *cryptorRef, /* RETURNED */ - size_t *dataUsed) /* optional, RETURNED */ -__OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0); - - -/* - Assuming we can use existing CCCryptorCreateFromData for all modes serviced by these: - int mode_encrypt(const unsigned char *pt, unsigned char *ct, unsigned long len, mode_context *ctx); - int mode_decrypt(const unsigned char *ct, unsigned char *pt, unsigned long len, mode_context *ctx); -*/ - -/* - Block mode encrypt and decrypt interfaces for IV tweaked blocks (XTS and CBC) - - int mode_encrypt_tweaked(const unsigned char *pt, unsigned long len, unsigned char *ct, const unsigned char *tweak, mode_context *ctx); - int mode_decrypt_tweaked(const unsigned char *ct, unsigned long len, unsigned char *pt, const unsigned char *tweak, mode_context *ctx); -*/ - -CCCryptorStatus CCCryptorEncryptDataBlock( - CCCryptorRef cryptorRef, - const void *iv, - const void *dataIn, - size_t dataInLength, - void *dataOut) -__OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0); - - -CCCryptorStatus CCCryptorDecryptDataBlock( - CCCryptorRef cryptorRef, - const void *iv, - const void *dataIn, - size_t dataInLength, - void *dataOut) -__OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0); - -/* - Assuming we can use the existing CCCryptorRelease() interface for - int mode_done(mode_context *ctx); -*/ - -/* - Not surfacing these other than with CCCryptorReset() - - int mode_setiv(const unsigned char *IV, unsigned long len, mode_context *ctx); - int mode_getiv(const unsigned char *IV, unsigned long *len, mode_context *ctx); -*/ - -/* - DES key utilities -*/ - -CCCryptorStatus CCDesIsWeakKey( - void *key, - size_t Length) -__OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0); - -void CCDesSetOddParity( - void *key, - size_t Length) -__OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0); - -uint32_t CCDesCBCCksum(void *input, void *output, - size_t length, void *key, size_t keylen, - void *ivec) -__OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0); - - -/* - * returns a cipher blocksize length iv in the provided iv buffer. - */ - -CCCryptorStatus -CCCryptorGetIV(CCCryptorRef cryptorRef, void *iv) -__OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0); - -/* - GCM Support Interfaces - - Use CCCryptorCreateWithMode() with the kCCModeGCM selector to initialize - a CryptoRef. Only kCCAlgorithmAES128 can be used with GCM and these - functions. IV Setting etc will be ignored from CCCryptorCreateWithMode(). - Use the CCCryptorGCMAddIV() routine below for IV setup. -*/ - -/* - This adds the initial vector octets from iv of length ivLen to the GCM - CCCryptorRef. You can call this function as many times as required to - process the entire IV. -*/ - -CCCryptorStatus -CCCryptorGCMAddIV(CCCryptorRef cryptorRef, - const void *iv, - size_t ivLen) -__OSX_AVAILABLE_STARTING(__MAC_10_8, __IPHONE_5_0); - -/* - Additional Authentication Data - After the entire IV has been processed, the additional authentication - data can be processed. Unlike the IV, a packet/session does not require - additional authentication data (AAD) for security. The AAD is meant to - be used as side–channel data you want to be authenticated with the packet. - Note: once you begin adding AAD to the GCM CCCryptorRef you cannot return - to adding IV data until the state has been reset. -*/ - -CCCryptorStatus -CCCryptorGCMAddAAD(CCCryptorRef cryptorRef, - const void *aData, - size_t aDataLen) -__OSX_AVAILABLE_STARTING(__MAC_10_8, __IPHONE_6_0); - -// Maintain the old symbol with incorrect camel-case for now. -CCCryptorStatus -CCCryptorGCMaddAAD(CCCryptorRef cryptorRef, - const void *aData, - size_t aDataLen) -__OSX_AVAILABLE_STARTING(__MAC_10_8, __IPHONE_6_0); - -// This is for old iOS5 clients -CCCryptorStatus -CCCryptorGCMAddADD(CCCryptorRef cryptorRef, - const void *aData, - size_t aDataLen) -__OSX_AVAILABLE_STARTING(__MAC_10_8, __IPHONE_5_0); - - -CCCryptorStatus CCCryptorGCMEncrypt( - CCCryptorRef cryptorRef, - const void *dataIn, - size_t dataInLength, - void *dataOut) -__OSX_AVAILABLE_STARTING(__MAC_10_8, __IPHONE_5_0); - - -CCCryptorStatus CCCryptorGCMDecrypt( - CCCryptorRef cryptorRef, - const void *dataIn, - size_t dataInLength, - void *dataOut) -__OSX_AVAILABLE_STARTING(__MAC_10_8, __IPHONE_5_0); - -/* - This terminates the GCM state gcm and stores the tag in tag of length - taglen octets. -*/ - -CCCryptorStatus CCCryptorGCMFinal( - CCCryptorRef cryptorRef, - const void *tag, - size_t *tagLength) -__OSX_AVAILABLE_STARTING(__MAC_10_8, __IPHONE_5_0); - -/* - This will reset the GCM CCCryptorRef to the state that CCCryptorCreateWithMode() - left it. The user would then call CCCryptorGCMAddIV(), CCCryptorGCMaddAAD(), etc. -*/ - -CCCryptorStatus CCCryptorGCMReset( - CCCryptorRef cryptorRef) -__OSX_AVAILABLE_STARTING(__MAC_10_8, __IPHONE_5_0); - -/* - This will initialize the GCM state with the given key, IV and AAD value - then proceed to encrypt or decrypt the message text and store the final - message tag. The definition of the variables is the same as it is for all - the manual functions. If you are processing many packets under the same - key you shouldn’t use this function as it invokes the pre–computation - with each call. -*/ - -CCCryptorStatus CCCryptorGCM( - CCOperation op, /* kCCEncrypt, kCCDecrypt */ - CCAlgorithm alg, - const void *key, /* raw key material */ - size_t keyLength, - const void *iv, - size_t ivLen, - const void *aData, - size_t aDataLen, - const void *dataIn, - size_t dataInLength, - void *dataOut, - const void *tag, - size_t *tagLength) -__OSX_AVAILABLE_STARTING(__MAC_10_8, __IPHONE_5_0); - - -void CC_RC4_set_key(void *ctx, int len, const unsigned char *data) -__OSX_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_5_0); - -void CC_RC4(void *ctx, unsigned long len, const unsigned char *indata, - unsigned char *outdata) -__OSX_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_5_0); - -/* -GCM interface can then be easily bolt on the rest of standard CCCryptor interface; typically following sequence can be used: - -CCCryptorCreateWithMode(mode = kCCModeGCM) -0..Nx: CCCryptorAddParameter(kCCParameterIV, iv) -0..Nx: CCCryptorAddParameter(kCCParameterAuthData, data) -0..Nx: CCCryptorUpdate(inData, outData) -0..1: CCCryptorFinal(outData) -0..1: CCCryptorGetParameter(kCCParameterAuthTag, tag) -CCCryptorRelease() - -*/ - -enum { - /* - Initialization vector - cryptor input parameter, typically - needs to have the same length as block size, but in some cases - (GCM) it can be arbitrarily long and even might be called - multiple times. - */ - kCCParameterIV, - - /* - Authentication data - cryptor input parameter, input for - authenticating encryption modes like GCM. If supported, can - be called multiple times before encryption starts. - */ - kCCParameterAuthData, - - /* - Mac Size - cryptor input parameter, input for - authenticating encryption modes like CCM. Specifies the size of - the AuthTag the algorithm is expected to produce. - */ - kCCMacSize, - - /* - Data Size - cryptor input parameter, input for - authenticating encryption modes like CCM. Specifies the amount of - data the algorithm is expected to process. - */ - kCCDataSize, - - /* - Authentication tag - cryptor output parameter, output from - authenticating encryption modes like GCM. If supported, - should be retrieved after the encryption finishes. - */ - kCCParameterAuthTag, -}; -typedef uint32_t CCParameter; - -/* - Sets or adds some other cryptor input parameter. According to the - cryptor type and state, parameter can be either accepted or - refused with kCCUnimplemented (when given parameter is not - supported for this type of cryptor at all) or kCCParamError (bad - data length or format). -*/ - -CCCryptorStatus CCCryptorAddParameter( - CCCryptorRef cryptorRef, - CCParameter parameter, - const void *data, - size_t dataSize); - - -/* - Gets value of output cryptor parameter. According to the cryptor - type state, the request can be either accepted or refused with - kCCUnimplemented (when given parameteris not supported for this - type of cryptor) or kCCBufferTooSmall (in this case, *dataSize - argument is set to the requested size of data). -*/ - -CCCryptorStatus CCCryptorGetParameter( - CCCryptorRef cryptorRef, - CCParameter parameter, - void *data, - size_t *dataSize); - - -#ifdef __cplusplus -} -#endif - -#endif /* _CC_CryptorSPI_H_ */ diff --git a/SignalServiceKit/src/Security/ECKeyPair+OWSPrivateKey.h b/SignalServiceKit/src/Security/ECKeyPair+OWSPrivateKey.h index 6e209eac4..520d7d0f0 100644 --- a/SignalServiceKit/src/Security/ECKeyPair+OWSPrivateKey.h +++ b/SignalServiceKit/src/Security/ECKeyPair+OWSPrivateKey.h @@ -1,6 +1,8 @@ -// Copyright © 2016 Open Whisper Systems. All rights reserved. +// +// Copyright (c) 2017 Open Whisper Systems. All rights reserved. +// -#import <25519/Curve25519.h> +#import NS_ASSUME_NONNULL_BEGIN diff --git a/SignalServiceKit/src/Security/OWSFingerprintBuilder.m b/SignalServiceKit/src/Security/OWSFingerprintBuilder.m index c5713159f..b3bfdee84 100644 --- a/SignalServiceKit/src/Security/OWSFingerprintBuilder.m +++ b/SignalServiceKit/src/Security/OWSFingerprintBuilder.m @@ -7,7 +7,7 @@ #import "OWSFingerprint.h" #import "OWSIdentityManager.h" #import "TSAccountManager.h" -#import <25519/Curve25519.h> +#import NS_ASSUME_NONNULL_BEGIN diff --git a/SignalServiceKit/src/Storage/AxolotlStore/TSStorageManager+SignedPreKeyStore.m b/SignalServiceKit/src/Storage/AxolotlStore/TSStorageManager+SignedPreKeyStore.m index a0eefb5ea..7ed3a28e9 100644 --- a/SignalServiceKit/src/Storage/AxolotlStore/TSStorageManager+SignedPreKeyStore.m +++ b/SignalServiceKit/src/Storage/AxolotlStore/TSStorageManager+SignedPreKeyStore.m @@ -7,7 +7,7 @@ #import "TSStorageManager+SignedPreKeyStore.h" #import "TSStorageManager+keyFromIntLong.h" -#import <25519/Ed25519.h> +#import #import #import diff --git a/SignalServiceKit/src/Storage/TSStorageManager.m b/SignalServiceKit/src/Storage/TSStorageManager.m index bca813480..fb9fe3c65 100644 --- a/SignalServiceKit/src/Storage/TSStorageManager.m +++ b/SignalServiceKit/src/Storage/TSStorageManager.m @@ -18,7 +18,7 @@ #import "TSDatabaseView.h" #import "TSInteraction.h" #import "TSThread.h" -#import <25519/Randomness.h> +#import #import #import diff --git a/SignalServiceKit/src/Storage/YapDatabaseConnection+OWS.m b/SignalServiceKit/src/Storage/YapDatabaseConnection+OWS.m index 0e31b973b..39b6eaa1f 100644 --- a/SignalServiceKit/src/Storage/YapDatabaseConnection+OWS.m +++ b/SignalServiceKit/src/Storage/YapDatabaseConnection+OWS.m @@ -3,7 +3,7 @@ // #import "YapDatabaseConnection+OWS.h" -#import <25519/Curve25519.h> +#import #import #import #import diff --git a/SignalShareExtension/ShareViewController.swift b/SignalShareExtension/ShareViewController.swift index c41496220..87ed190f8 100644 --- a/SignalShareExtension/ShareViewController.swift +++ b/SignalShareExtension/ShareViewController.swift @@ -6,11 +6,16 @@ import UIKit import Social import SignalMessaging +import PureLayout class ShareViewController: SLComposeServiceViewController { override func viewDidLoad() { super.viewDidLoad() + let someView = UIView() + someView.backgroundColor = UIColor.green + view.addSubview(someView) + someView.autoPinEdgesToSuperviewEdges() self.placeholder = StorageCoordinator.shared.path }