Changeset 8566


Ignore:
Timestamp:
Mar 29, 2019, 9:41:28 AM (6 months ago)
Author:
hectorgh
Message:

forcing certificate regeneration. Adding close to 20 years of certificate expiration date

Location:
n4d/trunk/fuentes
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • n4d/trunk/fuentes/debian/changelog

    r8398 r8566  
     1n4d (0.116.2) xenial; urgency=high
     2
     3  * Forcing certificate regeneration
     4
     5 -- Hector Garcia Huerta <hectorgh@gmail.com>  Fri, 29 Mar 2019 09:39:54 +0100
     6
    17n4d (0.116.1) xenial; urgency=high
    28
  • n4d/trunk/fuentes/debian/n4d.postinst

    r108 r8566  
    77case "$1" in
    88   configure)
     9   
    910        if [ ! -e "$FILESECRET" ]; then
    1011                cat /dev/urandom 2>/dev/null | tr -dc '0-9a-zA-Z' 2>/dev/null |{ head -c 50;echo ""; } > $FILESECRET
     
    1213        chmod 400 $FILESECRET
    1314        chown root:root $FILESECRET
    14        
     15
     16        if dpkg --compare-versions "$2" lt 0.116.2; then
     17                # lets force certificate regeneration
     18                if [ -e "$CERTPATH/n4dcert.pem"]; then
     19                        rm -rf "$CERTPATH/n4dcert.pem" || true
     20                fi
     21
    1522        /usr/share/n4d/certgen/n4d-certgen
    1623
    17        
    1824   ;;
    1925
  • n4d/trunk/fuentes/install-files/usr/share/n4d/certgen/n4d-certgen

    r103 r8566  
    2020                openssl genrsa -out ${CERTPATH}${CERTNAME}key.pem 2048
    2121                yes '' | openssl req -new -subj '/CN=n4d' -key ${CERTPATH}${CERTNAME}key.pem -out ${CERTPATH}${CERTNAME}.csr
    22                 openssl x509 -req -days 600 -in ${CERTPATH}${CERTNAME}.csr -signkey ${CERTPATH}${CERTNAME}key.pem -out ${CERTPATH}${CERTNAME}cert.pem
     22                openssl x509 -req -days 6000 -in ${CERTPATH}${CERTNAME}.csr -signkey ${CERTPATH}${CERTNAME}key.pem -out ${CERTPATH}${CERTNAME}cert.pem
    2323               
    2424        fi
Note: See TracChangeset for help on using the changeset viewer.