mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
This commit is contained in:
parent
d84f39be86
commit
2efe90fe48
3 changed files with 6 additions and 6 deletions
|
|
@ -32,9 +32,9 @@ export class IdentityModel extends AbstractModel {
|
||||||
});
|
});
|
||||||
|
|
||||||
addComputablesTo(this, {
|
addComputablesTo(this, {
|
||||||
smimeKeyEncrypted: () => this.smimeKey().includes('-----BEGIN ENCRYPTED PRIVATE KEY-----')
|
smimeKeyEncrypted: () => this.smimeKey().includes('-----BEGIN ENCRYPTED PRIVATE KEY-----'),
|
||||||
// smimeKeyValid: () => this.smimeKeyEncrypted() | this.smimeKey().includes('-----BEGIN PRIVATE KEY-----')
|
smimeKeyValid: () => /^-----BEGIN (ENCRYPTED )?PRIVATE KEY-----/.test(this.smimeKey()),
|
||||||
// smimeCertificateValid: () => this.smimeKey().includes('-----BEGIN CERTIFICATE-----')
|
smimeCertificateValid: () => /^-----BEGIN CERTIFICATE-----/.test(this.smimeCertificate())
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1377,7 +1377,7 @@ export class ComposePopupView extends AbstractViewPopup {
|
||||||
key && options.push(['OpenPGP', key]);
|
key && options.push(['OpenPGP', key]);
|
||||||
key = GnuPGUserStore.getPrivateKeyFor(email, 1);
|
key = GnuPGUserStore.getPrivateKeyFor(email, 1);
|
||||||
key && options.push(['GnuPG', key]);
|
key && options.push(['GnuPG', key]);
|
||||||
identity.smimeKey() && identity.smimeCertificate() && identity.email() === email
|
identity.smimeKeyValid() && identity.smimeCertificateValid() && identity.email() === email
|
||||||
&& options.push(['S/MIME']);
|
&& options.push(['S/MIME']);
|
||||||
console.dir({signOptions: options});
|
console.dir({signOptions: options});
|
||||||
this.signOptions(options);
|
this.signOptions(options);
|
||||||
|
|
|
||||||
|
|
@ -88,11 +88,11 @@
|
||||||
-->
|
-->
|
||||||
<details>
|
<details>
|
||||||
<summary><strong>S/MIME</strong></summary>
|
<summary><strong>S/MIME</strong></summary>
|
||||||
<div class="control-group">
|
<div class="control-group" data-bind="css: {'error': smimeKey() && !smimeKeyValid()}">
|
||||||
<label data-i18n="CRYPTO/PRIVATE_KEY"></label>
|
<label data-i18n="CRYPTO/PRIVATE_KEY"></label>
|
||||||
<textarea name="smimeKey" class="input-xxlarge" rows="14" autofocus="" autocomplete="off" data-bind="value: smimeKey"></textarea>
|
<textarea name="smimeKey" class="input-xxlarge" rows="14" autofocus="" autocomplete="off" data-bind="value: smimeKey"></textarea>
|
||||||
</div>
|
</div>
|
||||||
<div class="control-group">
|
<div class="control-group" data-bind="css: {'error': smimeCertificate() && !smimeCertificateValid()}">
|
||||||
<label data-i18n="SMIME/CERTIFICATE"></label>
|
<label data-i18n="SMIME/CERTIFICATE"></label>
|
||||||
<textarea name="smimeCertificate" class="input-xxlarge" rows="14" autofocus="" autocomplete="off" data-bind="value: smimeCertificate"></textarea>
|
<textarea name="smimeCertificate" class="input-xxlarge" rows="14" autofocus="" autocomplete="off" data-bind="value: smimeCertificate"></textarea>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue