({keyringId, armored})
| 247 | } |
| 248 | |
| 249 | function importPublicKey({keyringId, armored}) { |
| 250 | switch (getMessageType(armored)) { |
| 251 | case PGP_PUBLIC_KEY: |
| 252 | // ok |
| 253 | break; |
| 254 | case PGP_PRIVATE_KEY: |
| 255 | throw new MvError('No import of private PGP keys allowed.', 'WRONG_ARMORED_TYPE'); |
| 256 | default: |
| 257 | throw new MvError('No valid armored block found.', 'WRONG_ARMORED_TYPE'); |
| 258 | } |
| 259 | return controllerPort.send('import-pub-key', {keyringId, armored}); |
| 260 | } |
| 261 | |
| 262 | function processAutocryptHeader({keyringId, headers}) { |
| 263 | return controllerPort.send('process-autocrypt-header', {keyringId, headers}); |
nothing calls this directly
no test coverage detected