From 0f562e2a2c273c1ca12f1c08f4051efd713eb349 Mon Sep 17 00:00:00 2001 From: "Dr. Stephen Henson" Date: Sun, 9 Jul 2006 12:05:10 +0000 Subject: [PATCH] Fix from HEAD. --- crypto/pkcs7/pk7_smime.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crypto/pkcs7/pk7_smime.c b/crypto/pkcs7/pk7_smime.c index 99a0d63f38..dd3966b074 100644 --- a/crypto/pkcs7/pk7_smime.c +++ b/crypto/pkcs7/pk7_smime.c @@ -97,6 +97,8 @@ PKCS7 *PKCS7_sign(X509 *signcert, EVP_PKEY *pkey, STACK_OF(X509) *certs, PKCS7_add_certificate(p7, sk_X509_value(certs, i)); } + if(flags & PKCS7_DETACHED)PKCS7_set_detached(p7, 1); + if(!(p7bio = PKCS7_dataInit(p7, NULL))) { PKCS7err(PKCS7_F_PKCS7_SIGN,ERR_R_MALLOC_FAILURE); return NULL; @@ -133,7 +135,6 @@ PKCS7 *PKCS7_sign(X509 *signcert, EVP_PKEY *pkey, STACK_OF(X509) *certs, } } - if(flags & PKCS7_DETACHED)PKCS7_set_detached(p7, 1); if (!PKCS7_dataFinal(p7,p7bio)) { PKCS7err(PKCS7_F_PKCS7_SIGN,PKCS7_R_PKCS7_DATASIGN); -- 2.25.1