From 45e33ebeab1675fc1b1dec90f2b931433ad819c9 Mon Sep 17 00:00:00 2001 From: "Dr. Stephen Henson" Date: Thu, 13 Jul 2006 20:36:51 +0000 Subject: [PATCH] Fix from HEAD. Except we can't stream multipart/signed in 0.9.7 so that case still rewinds the stream. --- apps/smime.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; } -- 2.25.1