projects
/
oweals
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
671c1bc
)
Fix x509.c so it creates serial number file again if no
author
Dr. Stephen Henson
<steve@openssl.org>
Sat, 13 Nov 2004 13:26:24 +0000
(13:26 +0000)
committer
Dr. Stephen Henson
<steve@openssl.org>
Sat, 13 Nov 2004 13:26:24 +0000
(13:26 +0000)
serial number is supplied on command line.
apps/x509.c
patch
|
blob
|
history
diff --git
a/apps/x509.c
b/apps/x509.c
index dedd9f1a9a4893584ca60e7b9fcb142e1d0c1420..167b94f85f6277d6e0395a0a4a0372a9bc4208fb 100644
(file)
--- a/
apps/x509.c
+++ b/
apps/x509.c
@@
-598,9
+598,12
@@
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;
}
-
- if (!X509_set_serialNumber(x, sno))
+ else if (!X509_set_serialNumber(x, sno))
goto end;
if (!X509_set_issuer_name(x,req->req_info->subject)) goto end;