mirror of
https://github.com/openssl/openssl.git
synced 2024-11-28 04:25:31 +08:00
Set memory BIOs up properly when stripping text headers from S/MIME messages.
This commit is contained in:
parent
31636a3ed1
commit
d0c3628834
@ -68,7 +68,10 @@ static int cms_copy_content(BIO *out, BIO *in, unsigned int flags)
|
||||
if (out == NULL)
|
||||
tmpout = BIO_new(BIO_s_null());
|
||||
else if (flags & CMS_TEXT)
|
||||
{
|
||||
tmpout = BIO_new(BIO_s_mem());
|
||||
BIO_set_mem_eof_return(tmpout, 0);
|
||||
}
|
||||
else
|
||||
tmpout = out;
|
||||
|
||||
|
@ -380,6 +380,7 @@ int PKCS7_verify(PKCS7 *p7, STACK_OF(X509) *certs, X509_STORE *store,
|
||||
PKCS7err(PKCS7_F_PKCS7_VERIFY,ERR_R_MALLOC_FAILURE);
|
||||
goto err;
|
||||
}
|
||||
BIO_set_mem_eof_return(tmpout, 0);
|
||||
} else tmpout = out;
|
||||
|
||||
/* We now have to 'read' from p7bio to calculate digests etc. */
|
||||
|
Loading…
Reference in New Issue
Block a user