mirror of
https://github.com/pygos/build.git
synced 2024-11-22 11:09:46 +01:00
Generate trust anchor file for unbound
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
This commit is contained in:
parent
5128a00400
commit
750d53d82d
1 changed files with 15 additions and 0 deletions
|
@ -22,6 +22,7 @@ deploy() {
|
|||
local SOURCE="$1"
|
||||
local DEPLOY="$2"
|
||||
local DEVDEPLOY="$3"
|
||||
local tag alg type digest
|
||||
|
||||
make DESTDIR="$DEPLOY" install
|
||||
|
||||
|
@ -33,6 +34,20 @@ deploy() {
|
|||
|
||||
split_dev_deploy "$DEPLOY" "$DEVDEPLOY"
|
||||
strip_files ${DEPLOY}/{bin,lib}/*
|
||||
|
||||
echo "generating trust anchor root.key"
|
||||
|
||||
curl --silent -L https://data.iana.org/root-anchors/root-anchors.xml |\
|
||||
sed ':a;N;$!ba;s/\n//g' |\
|
||||
grep -o -P -e "<KeyDigest.*?</KeyDigest>" |\
|
||||
while read line; do
|
||||
tag=$(echo $line | grep -o -e "<KeyTag>[0-9]*</" | grep -o -w "[0-9]*")
|
||||
alg=$(echo $line | grep -o -e "<Algorithm>[0-9]*</" | grep -o -w "[0-9]*")
|
||||
type=$(echo $line | grep -o -e "<DigestType>[0-9]*</" | grep -o -w "[0-9]*")
|
||||
digest=$(echo $line | grep -o -e "<Digest>[A-F0-9]*</" | grep -o -w "[A-F0-9]*")
|
||||
|
||||
echo ". IN DS $tag $alg $type $digest" >> "$DEPLOY/var/lib/unbound/root.key"
|
||||
done
|
||||
}
|
||||
|
||||
check_update() {
|
||||
|
|
Loading…
Reference in a new issue