Fix from HEAD. Except we can't stream multipart/signed in 0.9.7 so that case

still rewinds the stream.
This commit is contained in:
Dr. Stephen Henson 2006-07-13 20:36:51 +00:00
parent 0f562e2a2c
commit 45e33ebeab

View File

@ -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;
}