mirror of
https://github.com/status-im/sqlcipher.git
synced 2025-02-23 01:08:09 +00:00
deprecate cipher_store_pass
This commit is contained in:
parent
47449e26b1
commit
1087a3fa6d
@ -119,7 +119,10 @@ int sqlcipher_codec_pragma(sqlite3* db, int iDb, Parse *pParse, const char *zLef
|
||||
} else
|
||||
if( sqlite3StrICmp(zLeft, "cipher_store_pass")==0 && zRight ) {
|
||||
if(ctx) {
|
||||
char *deprecation = "PRAGMA cipher_store_pass is deprecated, please remove from use";
|
||||
sqlcipher_codec_set_store_pass(ctx, sqlite3GetBoolean(zRight, 1));
|
||||
codec_vdbe_return_string(pParse, "cipher_store_pass", deprecation, P4_TRANSIENT);
|
||||
sqlite3_log(SQLITE_WARNING, deprecation);
|
||||
}
|
||||
} else
|
||||
if( sqlite3StrICmp(zLeft, "cipher_store_pass")==0 && !zRight ) {
|
||||
|
@ -214,6 +214,17 @@ do_test verify-cipher-store-pass-before-key-does-not-segfault {
|
||||
db close
|
||||
file delete -force test.db
|
||||
|
||||
# verify setting cipher_store_pass results in deprecation warning
|
||||
do_test verify-cipher-store-pass-deprecated {
|
||||
sqlite_orig db test.db
|
||||
execsql {
|
||||
PRAGMA key = 'test';
|
||||
PRAGMA cipher_store_pass = 1;
|
||||
}
|
||||
} {ok {PRAGMA cipher_store_pass is deprecated, please remove from use}}
|
||||
db close
|
||||
file delete -force test.db
|
||||
|
||||
# verify the pragma cipher
|
||||
# reports the default value
|
||||
if_built_with_openssl verify-pragma-cipher-default {
|
||||
|
Loading…
x
Reference in New Issue
Block a user