mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-10-06 20:37:14 +00:00
(feat) added support for S/MIME opaque signing (fixes #4582)
This commit is contained in:
1 parent
b52abfcbea
commit
676d2e6790
15 files changed
+569
-33
No files matched your search
@@ -256,10 +256,20 @@ static BOOL showNamedTextAttachmentsInline = NO;
|
||||
if ([st isEqualToString: @"x-pkcs7-mime"] ||
|
||||
[st isEqualToString: @"pkcs7-mime"])
|
||||
{
|
||||
// If the mail account has a valid certificate, we try to decode
|
||||
// the encrypted email. Otherwise, we fallback to a link viewer
|
||||
if ([[[viewer clientObject] mailAccountFolder] certificate])
|
||||
return [self encryptedViewer];
|
||||
NSString *smt;
|
||||
|
||||
smt = [[[_info objectForKey:@"parameterList"] valueForKey:@"smime-type"] lowercaseString];
|
||||
if ([smt isEqualToString:@"signed-data"])
|
||||
{
|
||||
return [self encryptedViewer];
|
||||
}
|
||||
else if ([smt isEqualToString:@"enveloped-data"])
|
||||
{
|
||||
// If the mail account has a valid certificate, we try to decode
|
||||
// the encrypted email. Otherwise, we fallback to a link viewer
|
||||
if ([[[viewer clientObject] mailAccountFolder] certificate])
|
||||
return [self encryptedViewer];
|
||||
}
|
||||
}
|
||||
|
||||
#if 0 /* the link viewer looks better than plain text ;-) */
|
||||
|
||||
Reference in new issue
Block a user