aboutsummaryrefslogtreecommitdiffstats
path: root/models/models.go
diff options
context:
space:
mode:
authorTim Culverhouse <tim@timculverhouse.com>2022-04-25 08:30:43 -0500
committerRobin Jarry <robin@jarry.cc>2022-04-27 09:46:11 +0200
commitd09636ee0b9957ed60fc01224ddfbb03c4f4b7fa (patch)
tree5f0ec8c9ad11a0f638c25dbd896a518e983dc779 /models/models.go
parentafe35839eddfaf43be0f791e97a926a15d91fc02 (diff)
downloadaerc-d09636ee0b9957ed60fc01224ddfbb03c4f4b7fa.tar.gz
refactor: refactor pgp implementation
This commit refactors the internal PGP implementation to make way for GPG integration. Signed-off-by: Tim Culverhouse <tim@timculverhouse.com> Acked-by: Koni Marti <koni.marti@gmail.com> Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'models/models.go')
-rw-r--r--models/models.go24
1 files changed, 24 insertions, 0 deletions
diff --git a/models/models.go b/models/models.go
index 4087c9d3..96683f29 100644
--- a/models/models.go
+++ b/models/models.go
@@ -185,3 +185,27 @@ type OriginalMail struct {
MIMEType string
RFC822Headers *mail.Header
}
+
+type SignatureValidity int32
+
+const (
+ UnknownValidity SignatureValidity = iota
+ Valid
+ InvalidSignature
+ UnknownEntity
+ UnsupportedMicalg
+ MicalgMismatch
+)
+
+type MessageDetails struct {
+ IsEncrypted bool
+ IsSigned bool
+ SignedBy string // Primary identity of signing key
+ SignedByKeyId uint64
+ SignatureValidity SignatureValidity
+ SignatureError string
+ DecryptedWith string // Primary Identity of decryption key
+ DecryptedWithKeyId uint64 // Public key id of decryption key
+ Body io.Reader
+ Micalg string
+}