Diff for /loncom/CrCA.pl between versions 1.4 and 1.7

version 1.4, 2019/07/18 00:28:04 version 1.7, 2023/05/14 19:14:39
Line 176  END Line 176  END
   } else {    } else {
       print "A lonca directory is required, but no directory exists\n";        print "A lonca directory is required, but no directory exists\n";
       exit;        exit;
   }      }
   if (-e "$dir/lonca/opensslca.conf") {    if (-e "$dir/lonca/opensslca.conf") {
       # retrieve existing config file and verify that if contains the required fields.        # retrieve existing config file and verify that if contains the required fields.
       %data = &parse_config("$dir/lonca/opensslca.conf");        %data = &parse_config("$dir/lonca/opensslca.conf");
Line 196  END Line 196  END
   
 A configuration file: $dir/lonca/opensslca.conf will be created.  A configuration file: $dir/lonca/opensslca.conf will be created.
   
 The following information will be included:   The following information will be included:
 Country, State/Province, City, Cluster Name, Organizational Name, E-mail address, Default certificate lifetime (days), CRL re-creation interval (days)  Country, State/Province, City, Cluster Name, Organizational Name, E-mail address, Default certificate lifetime (days), CRL re-creation interval (days)
   
 END  END
Line 258  x509_extensions  = certificate_extension Line 258  x509_extensions  = certificate_extension
 [ loncapa_policy ]  [ loncapa_policy ]
   
 commonName           = supplied  commonName           = supplied
   localityName         = supplied
 stateOrProvinceName  = supplied  stateOrProvinceName  = supplied
 countryName          = supplied  countryName          = supplied
 emailAddress         = supplied  emailAddress         = supplied
Line 272  crlDistributionPoints = URI:http://$clus Line 273  crlDistributionPoints = URI:http://$clus
 [ req ]  [ req ]
   
 default_bits       = 2048  default_bits       = 2048
   default_md         = sha256
   default_keyfile    = $dir/lonca/private/cakey.pem
   
   prompt             = no
 distinguished_name = loncapa_ca  distinguished_name = loncapa_ca
   
 x509_extensions    = loncapa_ca_extensions  x509_extensions    = loncapa_ca_extensions
Line 294  authorityKeyIdentifier=keyid:always,issu Line 299  authorityKeyIdentifier=keyid:always,issu
   
   
 END  END
             close($fh);
       } else {        } else {
           print 'Error: failed to wtite to '."$dir/lonca/opensslca.conf. Exiting.\n";            print 'Error: failed to wtite to '."$dir/lonca/opensslca.conf. Exiting.\n";
           exit;            exit;
Line 347  END Line 352  END
           } else {            } else {
               exit;                exit;
           }            }
       }         }
   } else {    } else {
       $sslkeypass = &get_new_sslkeypass();        $sslkeypass = &get_new_sslkeypass();
       # generate SSL key        # generate SSL key
Line 441  END Line 446  END
       chmod $mode, "$dir/lonca/index.txt";        chmod $mode, "$dir/lonca/index.txt";
   } else {    } else {
       print "lonca/index.txt file is missing\n";        print "lonca/index.txt file is missing\n";
       exit;         exit;
   }        }
   
   my $defcrlsel = 1;    my $defcrlsel = 1;
   if (!-e "$dir/lonca/crl/loncapaCAcrl.pem") {    if (!-e "$dir/lonca/crl/loncapaCAcrl.pem") {

Removed from v.1.4  
changed lines
  Added in v.1.7


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>