X-Git-Url: http://git.madism.org/?a=blobdiff_plain;f=lib-crypt%2Fsmime.c;h=479fd8c5dee168d62ca94aea3b88c986b2d7617c;hb=676b896e26b7aeef16d95aba7a5ea9322d2dc6e1;hp=fa7feac8dbced5661dcd882036a66f45ea7fbd96;hpb=69f4685e616347559d4ec714fd826d7f97a472ef;p=apps%2Fmadmutt.git diff --git a/lib-crypt/smime.c b/lib-crypt/smime.c index fa7feac..479fd8c 100644 --- a/lib-crypt/smime.c +++ b/lib-crypt/smime.c @@ -9,45 +9,26 @@ * please see the file GPL in the top level source directory. */ -#if HAVE_CONFIG_H -# include "config.h" -#endif - -#include -#include -#include -#include -#include -#include -#include +#include -#ifdef HAVE_LOCALE_H -# include -#endif -#ifdef HAVE_SYS_TIME_H -# include -#endif #ifdef HAVE_SYS_RESOURCE_H # include #endif -#include -#include -#include -#include - #include +#include #include #include #include -#include "mutt.h" #include "alias.h" #include "handler.h" #include "copy.h" #include "alias.h" + #include "crypt.h" +#include "smime.h" struct smime_command_context { const char *key; /* %k */ @@ -628,15 +609,11 @@ char *smime_get_field_from_db (char *mailbox, char *query, short public, return m_strdup(key); } - - - /* This sets the '*ToUse' variables for an upcoming decryption, where the reuquired key is different from SmimeDefaultKey. */ - -void _smime_getkeys (char *mailbox) +static void _smime_getkeys (char *mailbox) { char *k = NULL; char buf[STRING]; @@ -756,7 +733,7 @@ char *smime_findKeys (address_t * to, address_t * cc, address_t * bcc) if (fqdn) rfc822_qualify (tmp, fqdn); - tmp = mutt_remove_duplicates (tmp); + address_list_uniq(tmp); for (p = tmp; p; p = p->next) { char buf[LONG_STRING]; @@ -1304,7 +1281,7 @@ BODY *smime_build_smime_entity (BODY * a, char *certlist) return (NULL); } - t = mutt_new_body (); + t = body_new(); t->type = TYPEAPPLICATION; t->subtype = m_strdup("x-pkcs7-mime"); parameter_setval(&t->parameter, "name", "smime.p7m"); @@ -1420,7 +1397,7 @@ BODY *smime_sign_message (BODY * a) return (NULL); /* fatal error while signing */ } - t = mutt_new_body (); + t = body_new(); t->type = TYPEMULTIPART; t->subtype = m_strdup("signed"); t->encoding = ENC7BIT; @@ -1436,7 +1413,7 @@ BODY *smime_sign_message (BODY * a) t->parts = a; a = t; - t->parts->next = mutt_new_body (); + t->parts->next = body_new(); t = t->parts->next; t->type = TYPEAPPLICATION; t->subtype = m_strdup("x-pkcs7-signature");