because it added them manually and as part of SMIME_crlf_copy().
Removed the manual add.
Changes between 0.9.4 and 0.9.5 [28 Feb 2000]
+ *) PKCS7_encrypt() was adding text MIME headers twice because they
+ were added manually and by SMIME_crlf_copy().
+ [Steve Henson]
+
*) In bntest.c don't call BN_rand with zero bits argument.
[Steve Henson, pointed out by Andrew W. Gray <agray@iconsinc.com>]
BIO *p7bio = NULL;
int i;
X509 *x509;
- static char txthdr[] = "Content-type: text/plain\r\n\r\n";
if(!(p7 = PKCS7_new())) {
PKCS7err(PKCS7_F_PKCS7_ENCRYPT,ERR_R_MALLOC_FAILURE);
return NULL;
goto err;
}
- if(flags & PKCS7_TEXT) {
- if(BIO_write(p7bio, txthdr, sizeof(txthdr) - 1) < 0) {
- goto err;
- }
- }
-
SMIME_crlf_copy(in, p7bio, flags);
BIO_flush(p7bio);