mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-29 20:19:22 +03:00
Set S/MIME private key and certificate per identity #259
This commit is contained in:
parent
33de51b2d5
commit
6fa4dff23b
6 changed files with 83 additions and 35 deletions
|
|
@ -25,6 +25,9 @@ export class IdentityModel extends AbstractModel {
|
|||
pgpSign: false,
|
||||
pgpEncrypt: false,
|
||||
|
||||
smimeKey: '',
|
||||
smimeCertificate: '',
|
||||
|
||||
askDelete: false
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,6 +38,20 @@ export class IdentityPopupView extends AbstractViewPopup {
|
|||
)
|
||||
);
|
||||
this.defaultOptionsAfterRender = defaultOptionsAfterRender;
|
||||
|
||||
this.createSelfSigned = this.createSelfSigned.bind(this);
|
||||
}
|
||||
|
||||
createSelfSigned() {
|
||||
let identity = this.identity();
|
||||
Remote.request('CreateSMimeCertificate', (iError, oData) => {
|
||||
if (oData.Result.x509) {
|
||||
identity.smimeKey(oData.Result.pkey);
|
||||
identity.smimeCertificate(oData.Result.x509);
|
||||
}
|
||||
}, {
|
||||
email: identity.email()
|
||||
});
|
||||
}
|
||||
|
||||
submitForm(form) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue