diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2004-04-20 12:05:26 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2004-04-20 12:05:26 +0000 |
commit | 64674bcc8cee73853d00388a5e83cb1b2f38bec1 (patch) | |
tree | 55da245985e07e8e1c75bf1ae8569012a63cb014 /apps/req.c | |
parent | 1dc2d655addc773d6d91ee17a52c14a11d1cb8e1 (diff) |
Reduce chances of issuer and serial number duplication by use of random
initial serial numbers.
PR: 842
Diffstat (limited to 'apps/req.c')
-rw-r--r-- | apps/req.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/req.c b/apps/req.c index 5df8f89fcd..16e27d1b38 100644 --- a/apps/req.c +++ b/apps/req.c @@ -919,7 +919,9 @@ loop: } else { - if (!ASN1_INTEGER_set(X509_get_serialNumber(x509ss),0L)) goto end; + if (!rand_serial(NULL, + X509_get_serialNumber(x509ss))) + goto end; } if (!X509_set_issuer_name(x509ss, X509_REQ_get_subject_name(req))) goto end; |