pgp: add note for encrypted messages that are not signed

Since there is a prominent checkmark for encrypted messages, it might
not be entirely clear that the contents have not been signed.

Signed-off-by: Moritz Poldrack <git@moritz.sh>
Tested-by: Tim Culverhouse <tim@timculverhouse.com>
This commit is contained in:
Moritz Poldrack 2022-06-22 12:19:38 +02:00 committed by Robin Jarry
parent 8f9bb2b289
commit 15a07e5892
1 changed files with 5 additions and 0 deletions

View File

@ -44,12 +44,17 @@ func (p *PGPInfo) DrawSignature(ctx *ui.Context) {
}
func (p *PGPInfo) DrawEncryption(ctx *ui.Context, y int) {
warningStyle := p.uiConfig.GetStyle(config.STYLE_WARNING)
validStyle := p.uiConfig.GetStyle(config.STYLE_SUCCESS)
defaultStyle := p.uiConfig.GetStyle(config.STYLE_DEFAULT)
x := ctx.Printf(0, y, validStyle, "✓ Encrypted ")
x += ctx.Printf(x, y, defaultStyle,
"To %s (%8X) ", p.details.DecryptedWith, p.details.DecryptedWithKeyId)
if !p.details.IsSigned {
x += ctx.Printf(x, y, warningStyle,
"(message not signed!)")
}
}
func (p *PGPInfo) Draw(ctx *ui.Context) {