Skip to content
Snippets Groups Projects
Commit e25531cd authored by Oliver Wiese's avatar Oliver Wiese
Browse files

fix matching to lastsignedMail

parent 3605642e
Branches releases/2.3-1
No related merge requests found
......@@ -267,8 +267,8 @@ class IncomingMail {
}
let encState = self.cryptoObj?.encryptionState.rawValue ?? 0
var lastsignedDate: Date? = nil // TODO: Remove from PublicKeyProperty -> Update this in Record file...
if let sigState = self.cryptoObj?.signatureState, sigState == .ValidSignature {
var lastsignedDate: Date? = nil
if let sigState = self.cryptoObj?.signatureState, sigState == .ValidSignature{
lastsignedDate = self.date
}
var usedAddr = [AddressProperties]()
......@@ -278,7 +278,11 @@ class IncomingMail {
var autocryptPK = [PublicKeyProperties]()
for fpr in newAutocrypPublicKeys {
let pk = PublicKeyProperties(fingerprint: fpr, cryptoProtocol: .PGP, origin: .AutocryptHeader, preferEncryption: autocrypt?.prefer_encryption, lastSeenInAutocryptHeader: date, lastSeenSignedMail: nil, secretKeyProperty: nil, usedAddresses: usedAddr)
var signed: Date? = nil
if let sigendKeys = self.cryptoObj?.signedKeys, sigendKeys.contains(fpr) {
signed = lastsignedDate
}
let pk = PublicKeyProperties(fingerprint: fpr, cryptoProtocol: .PGP, origin: .AutocryptHeader, preferEncryption: autocrypt?.prefer_encryption, lastSeenInAutocryptHeader: date, lastSeenSignedMail: signed, secretKeyProperty: nil, usedAddresses: usedAddr)
autocryptPK.append(pk)
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment