|
|
|
@ -1,5 +1,5 @@
|
|
|
|
|
//
|
|
|
|
|
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
|
|
|
|
|
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
|
|
|
|
|
//
|
|
|
|
|
|
|
|
|
|
#import "SignalBaseTest.h"
|
|
|
|
@ -107,6 +107,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
|
|
};
|
|
|
|
|
options.cipherUnencryptedHeaderLength = kSqliteHeaderLength;
|
|
|
|
|
}
|
|
|
|
|
options.legacyCipherCompatibilityVersion = 3;
|
|
|
|
|
|
|
|
|
|
OWSAssertDebug(options.cipherDefaultkdfIterNumber == 0);
|
|
|
|
|
OWSAssertDebug(options.kdfIterNumber == 0);
|
|
|
|
@ -323,6 +324,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
|
|
|
|
|
|
|
NSError *_Nullable error = [YapDatabaseCryptoUtils convertDatabaseIfNecessary:databaseFilePath
|
|
|
|
|
databasePassword:databasePassword
|
|
|
|
|
options:OWSStorage.defaultDatabaseOptions
|
|
|
|
|
recordSaltBlock:recordSaltBlock];
|
|
|
|
|
if (error) {
|
|
|
|
|
OWSLogError(@"error: %@", error);
|
|
|
|
@ -364,6 +366,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
|
|
|
|
|
|
|
NSError *_Nullable error = [YapDatabaseCryptoUtils convertDatabaseIfNecessary:databaseFilePath
|
|
|
|
|
databasePassword:databasePassword
|
|
|
|
|
options:OWSStorage.defaultDatabaseOptions
|
|
|
|
|
recordSaltBlock:recordSaltBlock];
|
|
|
|
|
if (error) {
|
|
|
|
|
OWSLogError(@"error: %@", error);
|
|
|
|
@ -404,6 +407,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
|
|
|
|
|
|
|
NSError *_Nullable error = [YapDatabaseCryptoUtils convertDatabaseIfNecessary:databaseFilePath
|
|
|
|
|
databasePassword:databasePassword
|
|
|
|
|
options:OWSStorage.defaultDatabaseOptions
|
|
|
|
|
recordSaltBlock:recordSaltBlock];
|
|
|
|
|
|
|
|
|
|
XCTAssertNotNil(error);
|
|
|
|
@ -456,6 +460,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
|
|
|
|
|
|
|
NSError *_Nullable error = [YapDatabaseCryptoUtils convertDatabaseIfNecessary:databaseFilePath
|
|
|
|
|
databasePassword:databasePassword
|
|
|
|
|
options:OWSStorage.defaultDatabaseOptions
|
|
|
|
|
recordSaltBlock:recordSaltBlock];
|
|
|
|
|
if (error) {
|
|
|
|
|
OWSLogError(@"error: %@", error);
|
|
|
|
@ -499,6 +504,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
|
|
|
|
|
|
|
NSError *_Nullable error = [YapDatabaseCryptoUtils convertDatabaseIfNecessary:databaseFilePath
|
|
|
|
|
databasePassword:databasePassword
|
|
|
|
|
options:OWSStorage.defaultDatabaseOptions
|
|
|
|
|
recordSaltBlock:recordSaltBlock];
|
|
|
|
|
if (error) {
|
|
|
|
|
OWSLogError(@"error: %@", error);
|
|
|
|
@ -532,6 +538,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
|
|
|
|
|
|
|
NSError *_Nullable error = [YapDatabaseCryptoUtils convertDatabaseIfNecessary:databaseFilePath
|
|
|
|
|
databasePassword:databasePassword
|
|
|
|
|
options:OWSStorage.defaultDatabaseOptions
|
|
|
|
|
recordSaltBlock:recordSaltBlock];
|
|
|
|
|
if (error) {
|
|
|
|
|
OWSLogError(@"error: %@", error);
|
|
|
|
|