diff options
author | Richard Levitte <levitte@openssl.org> | 2002-05-08 15:12:59 +0000 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2002-05-08 15:12:59 +0000 |
commit | e9a182fa30e4e19b330415956f1a31da0dfbd11b (patch) | |
tree | 90575ec8bd1452340a186c319ff2ae3b553323ac /apps/smime.c | |
parent | b6db386ffd66f9227989df64ebedd95bc61597de (diff) |
Generate an error if rewinding wasn't possible.
Notified by Ken Hirsch <kenhirsch@myself.com>.
PR: 23
Diffstat (limited to 'apps/smime.c')
-rw-r--r-- | apps/smime.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/smime.c b/apps/smime.c index b05bd704e8..90fe026f56 100644 --- a/apps/smime.c +++ b/apps/smime.c @@ -471,7 +471,10 @@ 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); - BIO_reset(in); + if (BIO_reset(in) != 0 && (flags & PKCS7_DETACHED)) { + BIO_printf(bio_err, "Can't rewind input file\n"); + goto end; + } } else { if(informat == FORMAT_SMIME) p7 = SMIME_read_PKCS7(in, &indata); |