aboutsummaryrefslogtreecommitdiffstats
path: root/models/models.go
diff options
context:
space:
mode:
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
+}