diff options
author | Not Zed <NotZed@Ximian.com> | 2004-05-19 15:06:10 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2004-05-19 15:06:10 +0800 |
commit | d15cdfc929687f1c37939e78a08c30e4e4b636de (patch) | |
tree | 004f4759e1a11cb682f705402aa4987f5c9a7521 /camel/camel-smime-context.c | |
parent | dbd786a2dded4808518c91cb2414d173e50f5aa9 (diff) | |
download | gsoc2013-evolution-d15cdfc929687f1c37939e78a08c30e4e4b636de.tar.gz gsoc2013-evolution-d15cdfc929687f1c37939e78a08c30e4e4b636de.tar.zst gsoc2013-evolution-d15cdfc929687f1c37939e78a08c30e4e4b636de.zip |
use the article number instead of the messageid. Some servers are just
2004-05-19 Not Zed <NotZed@Ximian.com>
* providers/nntp/camel-nntp-folder.c (nntp_folder_get_message):
use the article number instead of the messageid. Some servers are
just broken.
(nntp_folder_cache_message): same. See #58655.
* camel-smime-context.c (sm_verify_cmsg): import the certs as
UsageEmailRecipient as well as signer, and also save the certs
always.
svn path=/trunk/; revision=25975
Diffstat (limited to 'camel/camel-smime-context.c')
-rw-r--r-- | camel/camel-smime-context.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/camel/camel-smime-context.c b/camel/camel-smime-context.c index f18fa4fd21..f087ccdb05 100644 --- a/camel/camel-smime-context.c +++ b/camel/camel-smime-context.c @@ -609,8 +609,13 @@ sm_verify_cmsg(CamelCipherContext *context, NSSCMSMessage *cmsg, CamelStream *ex poolp = NULL; } - /* import the certificates */ - if (NSS_CMSSignedData_ImportCerts(sigd, p->certdb, certUsageEmailSigner, PR_FALSE) != SECSuccess) { + /* import all certificates present */ + if (NSS_CMSSignedData_ImportCerts(sigd, p->certdb, certUsageEmailSigner, PR_TRUE) != SECSuccess) { + camel_exception_set (ex, CAMEL_EXCEPTION_SYSTEM, _("Certificate import failed")); + goto fail; + } + + if (NSS_CMSSignedData_ImportCerts(sigd, p->certdb, certUsageEmailRecipient, PR_TRUE) != SECSuccess) { camel_exception_set (ex, CAMEL_EXCEPTION_SYSTEM, _("Certificate import failed")); goto fail; } @@ -618,8 +623,7 @@ sm_verify_cmsg(CamelCipherContext *context, NSSCMSMessage *cmsg, CamelStream *ex /* check for certs-only message */ nsigners = NSS_CMSSignedData_SignerInfoCount(sigd); if (nsigners == 0) { - /* ?? Should we check other usages? */ - NSS_CMSSignedData_ImportCerts(sigd, p->certdb, certUsageEmailSigner, PR_TRUE); + /* already imported certs above, not sure what usage we should use here or if this isn't handled above */ if (NSS_CMSSignedData_VerifyCertsOnly(sigd, p->certdb, certUsageEmailSigner) != SECSuccess) { g_string_printf(description, _("Certificate only message, cannot verify certificates")); } else { |