Set detached flag in PKCS7 structure earlier to avoid eating up memory.
PR: 1071
This commit is contained in:
parent
8211a33c7f
commit
067707e367
1 changed files with 3 additions and 2 deletions
|
@ -98,6 +98,9 @@ PKCS7 *PKCS7_sign(X509 *signcert, EVP_PKEY *pkey, STACK_OF(X509) *certs,
|
|||
}
|
||||
}
|
||||
|
||||
if(flags & PKCS7_DETACHED)
|
||||
PKCS7_set_detached(p7, 1);
|
||||
|
||||
if (flags & (PKCS7_STREAM|PKCS7_PARTIAL))
|
||||
return p7;
|
||||
|
||||
|
@ -123,8 +126,6 @@ int PKCS7_final(PKCS7 *p7, BIO *data, int flags)
|
|||
|
||||
BIO_flush(p7bio);
|
||||
|
||||
if(PKCS7_type_is_signed(p7) && (flags & PKCS7_DETACHED))
|
||||
PKCS7_set_detached(p7, 1);
|
||||
|
||||
if (!PKCS7_dataFinal(p7,p7bio))
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue