summaryrefslogtreecommitdiffstats
path: root/apps/req.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/req.c')
-rw-r--r--apps/req.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/apps/req.c b/apps/req.c
index 4c4b9e3eac..7b8b4dbd60 100644
--- a/apps/req.c
+++ b/apps/req.c
@@ -752,8 +752,11 @@ loop:
}
i=make_REQ(req,pkey,!x509);
- if (kludge >= 0)
- req->req_info->req_kludge=kludge;
+ if ((kludge > 0) && !sk_X509_ATTRIBUTE_num(req->req_info->attributes))
+ {
+ sk_X509_ATTRIBUTE_free(req->req_info->attributes);
+ req->req_info->attributes = NULL;
+ }
if (!i)
{
BIO_printf(bio_err,"problems making Certificate Request\n");