Révision 2cf2c62b
Ajouté par jim-p il y a plus de 9 ans
etc/inc/system.inc | ||
---|---|---|
843 | 843 |
|
844 | 844 |
$cert = array(); |
845 | 845 |
$cert['refid'] = uniqid(); |
846 |
$cert['descr'] = gettext("webConfigurator default"); |
|
846 |
$cert['descr'] = gettext("webConfigurator default ({$cert['refid']})");
|
|
847 | 847 |
|
848 | 848 |
$dn = array( |
849 | 849 |
'countryName' => "US", |
... | ... | |
851 | 851 |
'localityName' => "Locality", |
852 | 852 |
'organizationName' => "{$g['product_name']} webConfigurator Self-Signed Certificate", |
853 | 853 |
'emailAddress' => "admin@{$config['system']['hostname']}.{$config['system']['domain']}", |
854 |
'commonName' => $config['system']['hostname'] . '-' . uniqid());
|
|
854 |
'commonName' => "{$config['system']['hostname']}-{$cert['refid']}");
|
|
855 | 855 |
$old_err_level = error_reporting(0); /* otherwise openssl_ functions throw warings directly to a page screwing menu tab */ |
856 | 856 |
if (!cert_create($cert, null, 2048, 2000, $dn, "self-signed", "sha256")){ |
857 | 857 |
while($ssl_err = openssl_error_string()){ |
... | ... | |
864 | 864 |
|
865 | 865 |
$a_cert[] = $cert; |
866 | 866 |
$config['system']['webgui']['ssl-certref'] = $cert['refid']; |
867 |
write_config(gettext("Importing HTTPS certificate"));
|
|
867 |
write_config(gettext("Generated new self-signed HTTPS certificate ({$cert['refid']})"));
|
|
868 | 868 |
return $cert; |
869 | 869 |
} |
870 | 870 |
|
Formats disponibles : Unified diff
Fix descriptions and cn on generated GUI cert to be consistent.