+ /* Fix encryption flags. */
+
+ /* No inline if multipart. */
+ if (WithCrypto && (newhdr->security & INLINE) && newhdr->content->next)
+ newhdr->security &= ~INLINE;
+
+ /* Do we even support multiple mechanisms? */
+ newhdr->security &= WithCrypto | ~(APPLICATION_PGP|APPLICATION_SMIME);
+
+ /* Theoretically, both could be set. Take the one the user wants to set by default. */
+ if ((newhdr->security & APPLICATION_PGP) && (newhdr->security & APPLICATION_SMIME))
+ {
+ if (option (OPTSMIMEISDEFAULT))
+ newhdr->security &= ~APPLICATION_PGP;
+ else
+ newhdr->security &= ~APPLICATION_SMIME;
+ }
+