From: Dr. Stephen Henson Date: Sun, 9 Jul 2006 12:05:10 +0000 (+0000) Subject: Fix from HEAD. X-Git-Tag: OpenSSL_0_9_7k~4 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=0f562e2a2c273c1ca12f1c08f4051efd713eb349;p=oweals%2Fopenssl.git Fix from HEAD. --- 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);