Debug: Logging new password creation.
This commit is contained in:
parent
c11c4361eb
commit
80a8c39213
3
Podfile
3
Podfile
|
@ -4,7 +4,6 @@ inhibit_all_warnings!
|
|||
|
||||
link_with ["Signal", "SignalTests"]
|
||||
|
||||
pod 'UICKeyChainStore', :podspec => 'Podspecs/UICKeyChainStore.podspec'
|
||||
pod 'SocketRocket', :git => 'https://github.com/square/SocketRocket.git', :commit => 'd0585af165'
|
||||
pod 'OpenSSL', '~> 1.0.110'
|
||||
pod 'libPhoneNumber-iOS', '~> 0.7'
|
||||
|
@ -14,6 +13,6 @@ pod 'TwistedOakCollapsingFutures','~> 1.0'
|
|||
pod 'YapDatabase/SQLCipher'
|
||||
pod 'AFNetworking', '~> 2.5'
|
||||
pod 'Mantle', '~> 1.5'
|
||||
|
||||
pod 'SSKeychain'
|
||||
pod 'JSQMessagesViewController', :git => 'https://github.com/dtsbourg/JSQMessagesViewController', :branch => 'JSignalQ'
|
||||
pod 'DJWActionSheet'
|
||||
|
|
|
@ -47,9 +47,9 @@ PODS:
|
|||
- SQLCipher/common (3.1.0)
|
||||
- SQLCipher/fts (3.1.0):
|
||||
- SQLCipher/common
|
||||
- SSKeychain (1.2.2)
|
||||
- TwistedOakCollapsingFutures (1.0.0):
|
||||
- UnionFind (~> 1.0)
|
||||
- UICKeyChainStore (1.0.7)
|
||||
- UnionFind (1.0.1)
|
||||
- YapDatabase/common (2.5.4):
|
||||
- CocoaLumberjack (~> 1)
|
||||
|
@ -67,8 +67,8 @@ DEPENDENCIES:
|
|||
- OpenSSL (~> 1.0.110)
|
||||
- PastelogKit (~> 1.2)
|
||||
- SocketRocket (from `https://github.com/square/SocketRocket.git`, commit `d0585af165`)
|
||||
- SSKeychain
|
||||
- TwistedOakCollapsingFutures (~> 1.0)
|
||||
- UICKeyChainStore (from `Podspecs/UICKeyChainStore.podspec`)
|
||||
- YapDatabase/SQLCipher
|
||||
|
||||
EXTERNAL SOURCES:
|
||||
|
@ -78,8 +78,6 @@ EXTERNAL SOURCES:
|
|||
SocketRocket:
|
||||
:commit: d0585af165
|
||||
:git: https://github.com/square/SocketRocket.git
|
||||
UICKeyChainStore:
|
||||
:podspec: Podspecs/UICKeyChainStore.podspec
|
||||
|
||||
CHECKOUT OPTIONS:
|
||||
JSQMessagesViewController:
|
||||
|
@ -105,8 +103,8 @@ SPEC CHECKSUMS:
|
|||
ProtocolBuffers: a834d6fe4ae0cc94d081b864e4948bdd483ad228
|
||||
SocketRocket: 9cbe08469513356cddc0afcab1ff160bd190296a
|
||||
SQLCipher: 981110217eb93c2779c34fb59e646a1c1da918d8
|
||||
SSKeychain: cc48bd3ad24fcd9125adb9e0d23dd50b8bbd08b9
|
||||
TwistedOakCollapsingFutures: 07aab84fd3958dc94d55ef705b12857d9fbe61d1
|
||||
UICKeyChainStore: eef407137f0397e95a3df32cdf05f7e2ddd99647
|
||||
UnionFind: 45777a8b6878d3a602af3654cc3a09b87389d356
|
||||
YapDatabase: c1d6912df1b4a160f7373ee7657d360e29bb00fd
|
||||
|
||||
|
|
2
Pods
2
Pods
|
@ -1 +1 @@
|
|||
Subproject commit 9601c2be9292f740e40d530ec35ea7182d0a8441
|
||||
Subproject commit a8bebaaf7290b4aa90621250a3ed64d9cb47da21
|
|
@ -1,6 +1,5 @@
|
|||
#import "PropertyListPreferences.h"
|
||||
#import "Constraints.h"
|
||||
#import <UICKeyChainStore/UICKeyChainStore.h>
|
||||
#import "TSStorageManager.h"
|
||||
|
||||
#define SignalDatabaseCollection @"SignalPreferences"
|
||||
|
|
|
@ -10,10 +10,10 @@
|
|||
#import <YapDatabase/YapDatabase.h>
|
||||
#import <YapDatabase/YapDatabaseRelationship.h>
|
||||
#import <CocoaLumberjack/DDLog.h>
|
||||
#import <UICKeyChainStore/UICKeyChainStore.h>
|
||||
#import "CryptoTools.h"
|
||||
#import "NSData+Base64.h"
|
||||
|
||||
#import <SSKeychain/SSKeychain.h>
|
||||
#import "TSDatabaseView.h"
|
||||
|
||||
|
||||
|
@ -138,11 +138,13 @@ static NSString * keychainDBPassAccount = @"TSDatabasePass";
|
|||
}
|
||||
|
||||
- (NSString*)databasePassword {
|
||||
NSString *dbPassword = [UICKeyChainStore stringForKey:keychainDBPassAccount];
|
||||
[SSKeychain setAccessibilityType:kSecAttrAccessibleAfterFirstUnlockThisDeviceOnly];
|
||||
NSString *dbPassword = [SSKeychain passwordForService:keychainService account:keychainDBPassAccount];
|
||||
|
||||
if (!dbPassword) {
|
||||
dbPassword = [[CryptoTools generateSecureRandomData:30] base64EncodedString];
|
||||
[UICKeyChainStore setString:dbPassword forKey:keychainDBPassAccount];
|
||||
[SSKeychain setPassword:dbPassword forService:keychainService account:keychainDBPassAccount];
|
||||
DDLogError(@"Set new password from keychain ...");
|
||||
}
|
||||
|
||||
return dbPassword;
|
||||
|
|
Loading…
Reference in New Issue