mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-11-12 03:40:46 +00:00
#3125: check s/mime certificate gebfore storing it
This commit is contained in:
1 parent
a8e08111a1
commit
09ca2dd2f3
4 files changed
+57
-5
No files matched your search
@@ -54,6 +54,7 @@
|
||||
#import <MailPartViewers/UIxMailRenderingContext.h> // cyclic
|
||||
#import <MailPartViewers/UIxMailSizeFormatter.h>
|
||||
#import <MailPartViewers/UIxMailPartViewer.h>
|
||||
#import <MailPartViewers/UIxMailPartSignedViewer.h>
|
||||
|
||||
#import "WOContext+UIxMailer.h"
|
||||
#import "UIxMailFormatter.h"
|
||||
@@ -244,11 +245,16 @@ static NSString *mailETag = nil;
|
||||
|
||||
// If we are looking at a S/MIME signed mail which wasn't sent
|
||||
// by our actual active user, we update the certificate of that
|
||||
// sender in the user's address book
|
||||
// sender in the user's address book. Only do so if the signature
|
||||
// is valid (trusted chain) and every signer certificate is issued
|
||||
// for the sender address.
|
||||
from = [[[[self clientObject] fromEnvelopeAddresses] lastObject] baseEMail];
|
||||
|
||||
if (![[context activeUser] hasEmail: from] &&
|
||||
[[self clientObject] isSigned])
|
||||
[[self clientObject] isSigned] &&
|
||||
[viewer isKindOfClass: NSClassFromString(@"UIxMailPartSignedViewer")] &&
|
||||
[viewer validSignature] &&
|
||||
[viewer signersMatchSender])
|
||||
{
|
||||
SOGoContactFolders *contactFolders;
|
||||
NSData *p7s;
|
||||
|
||||
Reference in new issue
Block a user