mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 10:49:06 +01:00
Throw DbException if database encryption key is missing.
This can happen on Android if the app is automatically restarted after a crash.
This commit is contained in:
@@ -78,7 +78,7 @@ class H2Database extends JdbcDatabase {
|
||||
|
||||
protected Connection createConnection() throws SQLException {
|
||||
byte[] key = config.getEncryptionKey();
|
||||
if(key == null) throw new IllegalStateException();
|
||||
if(key == null) return null;
|
||||
char[] password = encodePassword(key);
|
||||
Properties props = new Properties();
|
||||
props.setProperty("user", "user");
|
||||
|
||||
Reference in New Issue
Block a user