From: Dr. Stephen Henson Date: Thu, 13 Jul 2006 20:36:51 +0000 (+0000) Subject: Fix from HEAD. Except we can't stream multipart/signed in 0.9.7 so that case X-Git-Tag: OpenSSL_0_9_7k~3 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=45e33ebeab1675fc1b1dec90f2b931433ad819c9;p=oweals%2Fopenssl.git Fix from HEAD. Except we can't stream multipart/signed in 0.9.7 so that case still rewinds the stream. --- diff --git a/apps/smime.c b/apps/smime.c index 51bc893ffa..1204b1f6fc 100644 --- a/apps/smime.c +++ b/apps/smime.c @@ -483,7 +483,8 @@ int MAIN(int argc, char **argv) p7 = PKCS7_encrypt(encerts, in, cipher, flags); } else if(operation == SMIME_SIGN) { p7 = PKCS7_sign(signer, key, other, in, flags); - if (BIO_reset(in) != 0 && (flags & PKCS7_DETACHED)) { + if ((flags & PKCS7_DETACHED) && (outformat == FORMAT_SMIME) + && (BIO_reset(in) != 0)) { BIO_printf(bio_err, "Can't rewind input file\n"); goto end; }