Skip to content

Commit

Permalink
make-webcerts: improve dns name recognition and increase key size
Browse files Browse the repository at this point in the history
old system kept coming up with (none) as the dns name.

new system

increased key size to 2048 to further annoy the NSA.
  • Loading branch information
Dave Taht committed Apr 10, 2014
1 parent c4a7b9f commit 5032341
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions utils/cerowrt-chrome/files/etc/make-webcerts.sh
@@ -1,7 +1,7 @@
#!/bin/sh

days=21900
bits=1024
bits=2048
pem=/etc/lighttpd/lighttpd.pem
country=US
state=California
Expand All @@ -11,9 +11,24 @@ HL=`uname -n`
HS=`hostname`
IP=`ip addr show dev se00 | awk '/inet / {sub(/\/.*/, "", $2); print $2}'`

if [ "$HL" == "$HS" ]; then
if [ "$HS" = "(none)" ]
then
HS=cerowrt
fi

if [ "$HL" = "(none)" ]
then
HL=cerowrt
fi

DOTS=`echo $HL | cut -f2 -d.`

if [ -z $DOTS ]
then
if [ "$HL" = "$HS" ]; then
HL="$HS.home.lan"
fi
fi

commonname=$HL
if [ -n "$IP" ]
Expand Down

0 comments on commit 5032341

Please sign in to comment.