diff --git a/Podfile b/Podfile index ad0f4f337..f24c6de03 100644 --- a/Podfile +++ b/Podfile @@ -2,7 +2,7 @@ platform :ios, '7.0' link_with ["Signal", "SignalTests"] -pod 'UICKeyChainStore', '~> 1.0.5' +pod 'UICKeyChainStore', :podspec => 'Podspecs/UICKeyChainStore.podspec' pod 'OpenSSL', '~> 1.0.108' pod 'MMDrawerController', '~> 0.5.0' pod 'libPhoneNumber-iOS', '~> 0.7' diff --git a/Podspecs/UICKeyChainStore.podspec b/Podspecs/UICKeyChainStore.podspec new file mode 100644 index 000000000..f87d2f0e0 --- /dev/null +++ b/Podspecs/UICKeyChainStore.podspec @@ -0,0 +1,18 @@ +Pod::Spec.new do |s| + s.name = "UICKeyChainStore" + s.version = "1.0.6" + s.summary = "UICKeyChainStore is a simple wrapper for Keychain on iOS and OS X. Makes using Keychain APIs as easy as NSUserDefaults." + s.homepage = "https://github.com/kishikawakatsumi/UICKeyChainStore" + s.social_media_url = "https://twitter.com/k_katsumi" + s.license = { :type => "MIT", :file => "LICENSE" } + s.author = { "kishikawa katsumi" => "kishikawakatsumi@mac.com" } + s.source = { :git => "https://github.com/FredericJacobs/UICKeyChainStore.git", :tag => "v#{s.version}" } + + s.ios.deployment_target = "4.3" + s.osx.deployment_target = "10.6" + s.requires_arc = true + + s.source_files = "Lib/*" + + s.framework = "Security" +end diff --git a/Signal/src/environment/SGNKeychainUtil.m b/Signal/src/environment/SGNKeychainUtil.m index 90f3300c4..5f0f7c367 100644 --- a/Signal/src/environment/SGNKeychainUtil.m +++ b/Signal/src/environment/SGNKeychainUtil.m @@ -35,9 +35,7 @@ [self storeData:[CryptoTools generateSecureRandomData:SIGNALING_MAC_KEY_LENGTH] forKey:SIGNALING_MAC_KEY]; [self storeData:[CryptoTools generateSecureRandomData:SIGNALING_CIPHER_KEY_LENGTH] forKey:SIGNALING_CIPHER_KEY]; [self storeData:[CryptoTools generateSecureRandomData:SIGNALING_EXTRA_KEY_LENGTH] forKey:SIGNALING_EXTRA_KEY]; - [self storeData:[CryptoTools generateSecureRandomData:ZID_LENGTH] forKey:ZID_KEY]; - } +(void)wipeKeychain{ @@ -136,6 +134,7 @@ +(BOOL)storeString:(NSString*)string forKey:(NSString*)key{ BOOL success = [UICKeyChainStore setString:string forKey:key]; + if (!success) { DDLogError(@"Failed to set value for key: %@", key); }