Commit 78df5a2f authored by Dr. Stephen Henson's avatar Dr. Stephen Henson
Browse files

Fix x509.c so it creates serial number file again if no

serial number is supplied on command line.
parent 6c9f57d6
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -606,10 +606,13 @@ bad:
			sno = ASN1_INTEGER_new();
			if (!sno || !rand_serial(NULL, sno))
				goto end;
			}

			if (!X509_set_serialNumber(x, sno)) 
				goto end;
			ASN1_INTEGER_free(sno);
			sno = NULL;
			}
		else if (!X509_set_serialNumber(x, sno)) 
			goto end;

		if (!X509_set_issuer_name(x,req->req_info->subject)) goto end;
		if (!X509_set_subject_name(x,req->req_info->subject)) goto end;