cleaned up old touch id implementation

pull/1705/head
antelle 2021-02-01 21:08:02 +01:00
parent 87ad89beeb
commit acd360efb9
No known key found for this signature in database
GPG Key ID: 63C9777AAB7C563C
4 changed files with 2 additions and 40 deletions

View File

@ -664,7 +664,6 @@ class AppModel {
keyFileName: params.keyFileName,
keyFilePath: params.keyFilePath,
backup: (fileInfo && fileInfo.backup) || null,
fingerprint: (fileInfo && fileInfo.fingerprint) || null,
chalResp: params.chalResp
});
const openComplete = (err) => {
@ -755,7 +754,6 @@ class AppModel {
syncDate: file.syncDate || dt,
openDate: dt,
backup: file.backup,
fingerprint: file.fingerprint,
chalResp: file.chalResp
});
switch (this.settings.rememberKeyFiles) {
@ -808,9 +806,6 @@ class AppModel {
if (data && backup && backup.enabled && backup.pending) {
this.scheduleBackupFile(file, data);
}
if (params) {
this.saveFileFingerprint(file, params.password);
}
if (this.settings.yubiKeyAutoOpen) {
if (this.attachedYubiKeysCount > 0 && !this.files.some((f) => f.external)) {
this.tryOpenOtpDeviceInBackground();
@ -1224,18 +1219,6 @@ class AppModel {
}
}
saveFileFingerprint(file, password) {
if (Launcher && Launcher.fingerprints && !file.fingerprint) {
const fileInfo = this.fileInfos.get(file.id);
Launcher.fingerprints.register(file.id, password, (token) => {
if (token) {
fileInfo.fingerprint = token;
this.fileInfos.save();
}
});
}
}
usbDevicesChanged() {
const attachedYubiKeysCount = this.attachedYubiKeysCount;

View File

@ -16,7 +16,7 @@ const DefaultProperties = {
keyFilePath: null,
opts: null,
backup: null,
fingerprint: null,
fingerprint: null, // obsolete
chalResp: null
};

View File

@ -487,11 +487,6 @@ class FileModel extends Model {
syncError: error
});
const shouldResetFingerprint = this.passwordChanged && this.fingerprint;
if (shouldResetFingerprint && !error) {
this.fingerprint = null;
}
if (!this.open) {
return;
}
@ -759,7 +754,7 @@ FileModel.defineModelProperties({
keyEncryptionRounds: null,
kdfName: null,
kdfParameters: null,
fingerprint: null,
fingerprint: null, // obsolete
oldPasswordHash: null,
oldKeyFileHash: null,
oldKeyChangeDate: null

View File

@ -591,8 +591,6 @@ class OpenView extends View {
this.displayOpenKeyFile();
this.displayOpenChalResp();
this.openFileWithFingerprint(fileInfo);
if (fileWasClicked) {
this.focusInput(true);
}
@ -618,20 +616,6 @@ class OpenView extends View {
}
}
openFileWithFingerprint(fileInfo) {
if (!fileInfo.fingerprint) {
return;
}
if (Launcher && Launcher.fingerprints) {
Launcher.fingerprints.auth(fileInfo.id, fileInfo.fingerprint, (password) => {
this.inputEl.val(password);
this.inputEl.trigger('input');
this.openDb();
});
}
}
createDemo() {
if (!this.busy) {
this.closeConfig();