<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p>This commit removes the cms and smime "-nooldmime" option on the
grounds that the flags they use "CMS_NOOLDMIMETYPE" and
"PKCS7_NOOLDMIMETYPE" are not used in the pkcs7/cms code.</p>
<p>But those flags <b>are</b> used.</p>
<p>In include/openssl/pkcs7.h we have:</p>
<pre># define PKCS7_NOOLDMIMETYPE 0x400
</pre>
And in include/openssl/cms.h:<br>
<pre># define CMS_NOOLDMIMETYPE 0x400
</pre>
And include/openssl/smime.h<br>
<pre># define SMIME_OLDMIME 0x400
</pre>
And, in crypto/pkcs7/pk7mime.c:<br>
<pre>int SMIME_write_PKCS7(BIO *bio, PKCS7 *p7, BIO *data, int flags)
{
...
flags ^= SMIME_OLDMIME;
return SMIME_write_ASN1(bio, (ASN1_VALUE *)p7, data, flags,
ctype_nid, NID_undef, mdalgs,
ASN1_ITEM_rptr(PKCS7));
</pre>
And, finally in crypto/asn1/asn_mime.c:<br>
<br>
<pre>int SMIME_write_ASN1(BIO *bio, ASN1_VALUE *val, BIO *data, int flags,
int ctype_nid, int econt_nid,
STACK_OF(X509_ALGOR) *mdalgs, const ASN1_ITEM *it)
{
...
if (flags & SMIME_OLDMIME)
mime_prefix = "application/x-pkcs7-";
else
mime_prefix = "application/pkcs7-";
</pre>
<br>
That is to say the effect of setting the flag CMS_NOOLDMIMETYPE orĀ
PKCS7_NOOLDMIMETYPE is to <b>unset</b> the flag SMIME_OLDMIME in
calls to SMIME_write_ASN1, and so tell SMIME_write_ASN1 to write
new-style mime headers "application/pkcs7-" instead of the horrid
old "application/x-pkcs7-".<br>
<br>
TL; DR -- the flags "CMS_NOOLDMIMETYPE" and "PKCS7_NOOLDMIMETYPE" <b>are</b>
used, and shouldn't be deprecated.<br>
<br>
<br>
</body>
</html>