(options)
| 155 | } |
| 156 | |
| 157 | async uploadSyncMessage(options) { |
| 158 | // if key is in cache, specific unlock of sign key packet might be required |
| 159 | const keyOptions = { |
| 160 | key: options.key, |
| 161 | password: options.password, |
| 162 | reason: 'PWD_DIALOG_REASON_EDITOR' |
| 163 | }; |
| 164 | this.pwdControl = this.pwdControl || await createController('pwdDialog'); |
| 165 | const unlockedKey = await this.pwdControl.unlockKey(keyOptions); |
| 166 | // encrypt keyring sync message |
| 167 | const armored = await encryptSyncMessage(unlockedKey.key, this.keyring.sync.data.changeLog, this.state.keyringId); |
| 168 | // upload |
| 169 | const {eTag} = await this.upload({eTag: this.keyring.sync.data.eTag, keyringMsg: armored}); |
| 170 | this.keyring.sync.data.eTag = eTag; |
| 171 | } |
| 172 | |
| 173 | /** |
| 174 | * Check if key can be unlocked without requesting the password from the user |
no test coverage detected