Subversion Repositories ALCASAR

Compare Revisions

Ignore whitespace Rev 1742 → Rev 1743

/scripts/alcasar-importcert.sh
35,6 → 35,7
hostnamectl set-hostname alcasar.localdomain
$SED "s/^\tAuthName.*/\tAuthName alcasar.localdomain/g" /etc/httpd/conf/webapps.d/alcasar.conf
$SED "s/^\tErrorDocument.*/\tErrorDocument 404 https:\/\/alcasar.localdomain\//g" /etc/httpd/conf/webapps.d/alcasar.conf
$SED "s/:.*:/:alcasar.localdomain:/g" /usr/local/etc/digest/key_*
}
 
function defaultCert()
44,8 → 45,8
if [ -f $DIR_CERT/certs/server-chain.crt.old ]
then
mv $DIR_CERT/certs/server-chain.crt.old $DIR_CERT/certs/server-chain.crt
else
rm -f $DIR_CERT/certs/server-chain.crt
#else
# rm -f $DIR_CERT/certs/server-chain.crt
fi
}
 
73,6 → 74,7
hostnamectl set-hostname $fqdn
$SED "s/^\tAuthName.*/\tAuthName $fqdn/g" /etc/httpd/conf/webapps.d/alcasar.conf
$SED "s/^\tErrorDocument.*/\tErrorDocument 404 https:\/\/$fqdn\//g" /etc/httpd/conf/webapps.d/alcasar.conf
$SED "s/:.*:/:$fqdn:/g" /usr/local/etc/digest/key_*
fi
}
 
91,6 → 93,8
cp $cert $DIR_CERT/certs/alcasar.crt
cp $key $DIR_CERT/private/alcasar.key
 
rm $cert $key
 
chown root:apache $DIR_CERT/certs/alcasar.crt
chown root:apache $DIR_CERT/private/alcasar.key
 
105,6 → 109,7
mv $DIR_CERT/certs/server-chain.crt $DIR_CERT/certs/server-chain.crt.old
fi
cp $sc $DIR_CERT/certs/server-chain.crt
rm $sc
chown root:apache $DIR_CERT/certs/server-chain.crt
chmod 750 $DIR_CERT/certs/server-chain.crt
fi
/web/acc/admin/network.php
47,6 → 47,8
$l_server_chain = "Chaîne de certification (si nécéssaire : .crt) :";
$l_default_cert = "Revenir au certificat d'origine";
$l_import = "Importer";
$l_current_certificate = "Certificat actuel";
$l_validated = "Validé par :";
 
} else {
$l_network_title = "Network configuration";
76,6 → 78,9
$l_server_chain = "Server-chain (if necessary : .crt) :";
$l_default_cert = "Back to default certificate";
$l_import = "Import";
$l_current_certificate = "Current certificate";
$l_validated = "Validated by :";
 
}
if (isset($_POST['choix'])){$choix=$_POST['choix'];} else {$choix="";}
switch ($choix)
279,10 → 284,24
<input type="hidden" name="MAX_FILE_SIZE" value=<?php echo $maxsize;?>><br>
<input type="submit" <?php echo "value=\"".$l_import."\""?>>
</form>
<?php
$domain = exec("/bin/openssl x509 -noout -subject -in /etc/pki/tls/certs/alcasar.crt | sed -n '/^subject/s/^.*CN=//p'");
$organization = exec("/bin/openssl x509 -noout -subject -in /etc/pki/tls/certs/alcasar.crt | sed -n '/^subject/s/^.*O=//p' | sed -n 's/\/.*$//p'");
$CAdomain = exec("/bin/openssl x509 -noout -issuer -in /etc/pki/tls/certs/alcasar.crt | sed -n '/^issuer/s/^.*CN=//p'");
$CAorganization = exec("/bin/openssl x509 -noout -issuer -in /etc/pki/tls/certs/alcasar.crt | sed -n '/^issuer/s/^.*O=//p' | sed -n 's/\/.*$//p'");
 
echo "<br><br>\n";
echo "<h3>".$l_current_certificate."</h3>\n";
echo "Common name : ".$domain."<br>\n";
echo "Organization : ".$organization."<br/>\n";
echo "<h4>". $l_validated ."</h4>\n";
echo "Common name : ".$CAdomain."<br>\n";
echo "Organization : ".$CAorganization."<br>\n";
?>
</td><td>
<form method="post" action="network.php">
<input type="hidden" name="default">
<input type="submit" <?php echo "value=\"".$l_default_cert."\""?>>
<input type="submit" <?php echo "value=\"".$l_default_cert."\""; if(!file_exists("/etc/pki/tls/certs/alcasar.crt.old") || !file_exists("/etc/pki/tls/private/alcasar.key.old")){ echo "disabled";}?> >
</form>
</td>
</tr>
/web/acc/phpsysinfo/includes/lang/en.php
19,6 → 19,8
//
// $Id: en.php,v 1.21 2007/02/18 19:11:31 bigmichi1 Exp $
 
$text['domain'] = 'Domain name';
 
$text['title'] = 'System Information';
 
$text['vitals'] = 'System Vital';
/web/acc/phpsysinfo/includes/lang/fr.php
19,6 → 19,8
//
// $Id: fr.php,v 1.27 2007/03/15 08:22:31 bigmichi1 Exp $
 
$text['domain'] = 'Nom de domaine';
 
$text['title'] = 'Informations Syst&egrave;me ';
 
$text['vitals'] = 'Syst&egrave;me';
/web/acc/phpsysinfo/includes/xml/vitals.php
63,6 → 63,7
$strLoadbar = "";
$uptime = "";
$date = exec ("/bin/date");
$ndd = exec("/bin/openssl x509 -noout -subject -in /etc/pki/tls/certs/alcasar.crt | sed -n '/^subject/s/^.*CN=//p'");
$cert_ca_expiration_date = exec ("sudo /usr/bin/openssl x509 -noout -in /etc/pki/tls/certs/alcasar.crt -dates|grep After|cut -d\"=\" -f2");
if( $XPath->match( "/phpsysinfo/Vitals/CPULoad" ) )
$strLoadbar = "<br>" . create_bargraph( $XPath->getData( "/phpsysinfo/Vitals/CPULoad" ), 100, $scale_factor ) . "&nbsp;" . $XPath->getData( "/phpsysinfo/Vitals/CPULoad" ) . "%";
73,6 → 74,10
. " <td><font size=\"-1\">" . $XPath->getData( "/phpsysinfo/Vitals/Hostname" ) . "</font></td>\n"
. " </tr>\n"
. " <tr>\n"
. " <td valign=\"top\"><font size=\"-1\">" . $text['domain'] . "</font></td>\n"
. " <td><font size=\"-1\">" . $ndd . "</font></td>\n"
. " </tr>\n"
. " <tr>\n"
. " <td valign=\"top\"><font size=\"-1\">" . $text['cert_expiration_date'] . "</font></td>\n"
. " <td><font size=\"-1\">" . $cert_ca_expiration_date . "</font></td>\n"
. " </tr>\n"