summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2002-07-31 14:05:57 +0000
committerRichard Levitte <levitte@openssl.org>2002-07-31 14:05:57 +0000
commit87e8feca95165a5f4d21a385cf5ff7a1f13c43c8 (patch)
tree675e3b491f3baf36f5c2da9245a58a4c052adae7 /apps
parente70a39830cd50af316d677cef7d47b4f14047f8d (diff)
If the email address is moved from the subject to the subject alternate name,
the subject in the certificate would differ from the subject in the index file, which has quite bad concequences. PR: 180
Diffstat (limited to 'apps')
-rw-r--r--apps/ca.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/apps/ca.c b/apps/ca.c
index cbb1a05293..ad02e0072b 100644
--- a/apps/ca.c
+++ b/apps/ca.c
@@ -2094,9 +2094,8 @@ again2:
}
}
- row[DB_name]=X509_NAME_oneline(dn_subject,NULL,0);
row[DB_serial]=BN_bn2hex(serial);
- if ((row[DB_name] == NULL) || (row[DB_serial] == NULL))
+ if (row[DB_serial] == NULL)
{
BIO_printf(bio_err,"Memory allocation failure\n");
goto err;
@@ -2319,10 +2318,10 @@ again2:
/* row[DB_serial] done already */
row[DB_file]=(char *)OPENSSL_malloc(8);
- /* row[DB_name] done already */
+ row[DB_name]=X509_NAME_oneline(X509_get_subject_name(ret),NULL,0);
if ((row[DB_type] == NULL) || (row[DB_exp_date] == NULL) ||
- (row[DB_file] == NULL))
+ (row[DB_file] == NULL) || (row[DB_name] == NULL))
{
BIO_printf(bio_err,"Memory allocation failure\n");
goto err;