Monitor SSL changes to keep up to date
This commit is contained in:
parent
87d441f7e8
commit
832316a13e
|
@ -12,12 +12,13 @@ echo '<br />';
|
|||
echo '<b>novaBBS:</b><br /><a href="https://www.novabbs.com">www.novabbs.com</a><br />';
|
||||
echo '<br />';
|
||||
|
||||
echo 'Newsreader Access:<br />';
|
||||
echo "Newsreader Access (most text newsgroups available, use 'list'):<br />";
|
||||
echo 'v77lu6t26velvaddm4gibyzd5sogskuczp7vwoc4vxmukvvaucva.b32.i2p<br />';
|
||||
echo 'zkcvkb5xprurx5dvpanhyivneuzah6k6xayxgxd4h2ekklxgoi2x5aad.onion:119<br />';
|
||||
echo 'news.novabbs.org:119 or 563<br />';
|
||||
echo '<br />';
|
||||
echo 'Create NNTP Account: Use one of the <i>Rocksolid Light</i> links above to create account.<br />';
|
||||
echo 'Log into NNTP server with your username/password to post<br />';
|
||||
echo 'NNTP Peering also available in i2p/tor/clearnet<br />';
|
||||
echo '<br />';
|
||||
echo 'Rocksolid is also available from any usenet news provider carrying the rocksolid.* hierarchy<br />';
|
||||
|
|
|
@ -1,12 +1,14 @@
|
|||
<?php
|
||||
|
||||
/* Set paths for fullchain.pem abnd privkey.pem */
|
||||
$letsencrypt['fullchain'] = file_get_contents("/etc/letsencrypt/live/<domain>/fullchain.pem");
|
||||
$letsencrypt['privkey'] = file_get_contents("/etc/letsencrypt/live/<domain>/privkey.pem");
|
||||
/* Set paths for fullchain.pem and privkey.pem */
|
||||
$letsencrypt['path'] = "/etc/letsencrypt/live/<domain>/";
|
||||
|
||||
$letsencrypt['fullchain'] = file_get_contents($letsencrypt['path']."fullchain.pem");
|
||||
$letsencrypt['privkey'] = file_get_contents($letsencrypt['path']."/privkey.pem");
|
||||
|
||||
/* Please do not change anything below */
|
||||
$letsencrypt['pem_private_key'] = openssl_pkey_get_private($letsencrypt['privkey']);
|
||||
$pem_public_key = openssl_pkey_get_details($letsencrypt['pem_private_key'])['key'];
|
||||
|
||||
$letsencrypt['server.pem'] = $letsencrypt['fullchain'];
|
||||
$letsencrypt['pubkey.pem'] = $pem_public_key;
|
||||
$letsencrypt['pubkey.pem'] = $pem_public_key;
|
||||
|
|
|
@ -1218,6 +1218,13 @@ function create_node_ssl_cert($pemfile) {
|
|||
$uinfo=posix_getpwnam($CONFIG['webserver_user']);
|
||||
$pubkeyfile = $ssldir.'/pubkey.pem';
|
||||
$pubkeytxtfile = $webtmp.'/pubkey.txt';
|
||||
$ssltime = filectime($letsencrypt['path'])."fullchain.pem";
|
||||
if(isset($letsencrypt['path'])) {
|
||||
if($ssltime > filectime($pemfile)) {
|
||||
touch($config_dir.'/ssl.reload');
|
||||
}
|
||||
|
||||
}
|
||||
if(!file_exists($config_dir.'/ssl.reload')) {
|
||||
if((is_file($pemfile)) && (is_file($pubkeyfile)) && (is_file($pubkeytxtfile))) {
|
||||
if(md5_file($pubkeyfile) == md5_file($pubkeytxtfile)) {
|
||||
|
@ -1234,6 +1241,9 @@ function create_node_ssl_cert($pemfile) {
|
|||
file_put_contents($pemfile, $letsencrypt['server.pem'].$letsencrypt['privkey']);
|
||||
file_put_contents($pubkeyfile, $letsencrypt['pubkey.pem']);
|
||||
file_put_contents($pubkeytxtfile, $letsencrypt['pubkey.pem']);
|
||||
touch($pemfile, $ssltime);
|
||||
touch($pubkeyfile, $ssltime);
|
||||
touch($pubkeytxtfile, $ssltime);
|
||||
} else {
|
||||
/* Create self signed cert */
|
||||
$certificateData = array(
|
||||
|
|
Loading…
Reference in New Issue