Android security implementation Phase 3.4

This commit is contained in:
2026-11-03 19:41:09 +02:00
parent 57e194562b
commit 9b0009faef
8 changed files with 165 additions and 43 deletions
+6 -4
View File
@@ -12,6 +12,7 @@ const mainActivity = fs.readFileSync(path.join(root, 'android', 'app', 'src', 'm
const plugin = fs.readFileSync(path.join(root, 'android', 'app', 'src', 'main', 'java', 'studio', 'daybreak', 'mail', 'EpMailPlugin.kt'), 'utf8');
const androidMailService = fs.readFileSync(path.join(root, 'android', 'app', 'src', 'main', 'java', 'studio', 'daybreak', 'mail', 'AndroidMailService.kt'), 'utf8');
const androidPgpPolicy = fs.readFileSync(path.join(root, 'android', 'app', 'src', 'main', 'java', 'studio', 'daybreak', 'mail', 'AndroidPgpPolicy.kt'), 'utf8');
const androidPgpConfirmationGate = fs.readFileSync(path.join(root, 'android', 'app', 'src', 'main', 'java', 'studio', 'daybreak', 'mail', 'AndroidPgpConfirmationGate.kt'), 'utf8');
const productivity = fs.readFileSync(path.join(root, 'productivity.js'), 'utf8');
const androidBridge = fs.readFileSync(path.join(root, 'scripts', 'android-bridge.js'), 'utf8');
const androidPgp = fs.readFileSync(path.join(root, 'scripts', 'android-pgp.js'), 'utf8');
@@ -77,10 +78,11 @@ test('Android OpenPGP uses the encrypted vault and queues only built MIME data',
assert.match(plugin, /pgpStoreChangeWarning/);
assert.match(plugin, /plaintextSendWarning/);
assert.match(plugin, /Send plaintext/);
assert.match(plugin, /\.setNegativeButton\("Cancel"\) \{ _, _ -> call\.reject\("OpenPGP key change cancelled\."\) \}/);
assert.match(plugin, /\.setPositiveButton\("Confirm changes"\)[\s\S]*bridge\.execute \{[\s\S]*AndroidAccountVault\.savePgpStore\(next\)/);
assert.match(plugin, /\.setNegativeButton\("Cancel"\)[\s\S]*PLAINTEXT_CANCELLED/);
assert.match(plugin, /\.setPositiveButton\("Send plaintext"\)[\s\S]*sendPrepared\(call, input\)/);
assert.match(plugin, /showPgpConfirmation\(/);
assert.match(plugin, /onCancelled = \{ call\.reject\("OpenPGP key change cancelled\."\) \}/);
assert.match(plugin, /onConfirmed = \{ sendPrepared\(call, input\) \}/);
assert.match(plugin, /PLAINTEXT_CANCELLED/);
assert.match(androidPgpConfirmationGate, /compareAndSet\(false, true\)/);
assert.match(androidPgpPolicy, /fun storeChangeWarning/);
assert.match(androidPgpPolicy, /fun plaintextSendWarning/);
assert.match(androidPgp, /curve25519Legacy/);