File: supported-algos

package info (click to toggle)
pdns 5.0.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 10,824 kB
  • sloc: cpp: 101,247; sh: 5,616; makefile: 2,318; sql: 860; ansic: 675; python: 635; yacc: 245; perl: 161; lex: 131
file content (20 lines) | stat: -rwxr-xr-x 400 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/bash
exec 2>&1
set -ex

TMPFILE=$(mktemp)
cleanup() {
  rm -f "$TMPFILE"
}
trap cleanup EXIT

pdnsutil list-algorithms 2>/dev/null | tee "$TMPFILE"

for algo in RSASHA1 RSASHA1-NSEC3-SHA1 RSASHA256 RSASHA512 ECDSAP256SHA256 ECDSAP384SHA384 ED25519 ED448; do
    if ! grep -E -c " $algo\$" "$TMPFILE"; then
        echo Algorithm $algo is not supported
        exit 1
    fi
done

echo success