Commit 8b87a67c authored by Leigh Stoller's avatar Leigh Stoller

Fixes so that mysyscert does not blow up when no urn is provided; do

not put in any of the req_altname stuff.
parent 7cc8f51e
......@@ -218,6 +218,9 @@ system("cp -f $TEMPLATE syscert.cnf") == 0
open(TEMP, ">>syscert.cnf")
or fatal("Could not open $TEMPLATE for append: $!");
if (defined($urn)) {
print TEMP "subjectAltName=\@req_altname\n";
}
print TEMP "basicConstraints=critical,CA:" .
( $is_ca ? "TRUE" : "FALSE" ) . "\n\n";
......@@ -241,10 +244,12 @@ print TEMP "OU\t\t= \"$orgunit\"\n";
print TEMP "CN\t\t= $uuid\n";
print TEMP "emailAddress\t= $email\n";
print TEMP "\n";
print TEMP "[ req_altname ]\n";
print TEMP "URI=$urn\n" if defined( $urn );
print TEMP "\n";
if (defined($urn)) {
print TEMP "\n";
print TEMP "[ req_altname ]\n";
print TEMP "URI=$urn\n";
print TEMP "\n";
}
close(TEMP)
or fatal("Could not close syscert.cnf: $!");
......
......@@ -12,7 +12,7 @@ oid_section = protogeni_oids
[ protogeni_oids ]
xmlrpc = 2.25.305821105408246119474742976030998643995
# Modifed for update 5.21
# This will be appended to by mksyscert.
[ request_extensions ]
subjectKeyIdentifier=hash
subjectAltName=@req_altname
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment