mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Misc fixes for cert / local CA management
This commit is contained in:
parent
d152e7299b
commit
071d8c4cbe
2 changed files with 5 additions and 2 deletions
|
@ -27,7 +27,7 @@ regen_local_ca() {
|
|||
rm -f index.txt
|
||||
touch index.txt
|
||||
cp /usr/share/yunohost/templates/ssl/openssl.cnf openssl.ca.cnf
|
||||
sed -i s/yunohost.org/${domain}/g openssl.ca.cnf
|
||||
sed -i 's/yunohost.org/${domain}/g' openssl.ca.cnf
|
||||
openssl req -x509 \
|
||||
-new \
|
||||
-config openssl.ca.cnf \
|
||||
|
@ -57,6 +57,9 @@ do_init_regen() {
|
|||
chown root:root $LOGFILE
|
||||
chmod 640 $LOGFILE
|
||||
|
||||
# Make sure this conf exists
|
||||
cp /usr/share/yunohost/templates/ssl/openssl.cnf ${ssl_dir}/openssl.ca.cnf
|
||||
|
||||
# create default certificates
|
||||
if [[ ! -f "$ynh_ca" ]]; then
|
||||
regen_local_ca yunohost.org >>$LOGFILE
|
||||
|
|
|
@ -641,7 +641,7 @@ def _get_status(domain):
|
|||
valid_up_to = datetime.strptime(cert.get_notAfter().decode('utf-8'), "%Y%m%d%H%M%SZ")
|
||||
days_remaining = (valid_up_to - datetime.utcnow()).days
|
||||
|
||||
if cert_issuer == _name_self_CA():
|
||||
if cert_issuer == 'yunohost.org' or cert_issuer == _name_self_CA():
|
||||
CA_type = {
|
||||
"code": "self-signed",
|
||||
"verbose": "Self-signed",
|
||||
|
|
Loading…
Add table
Reference in a new issue