File: buildinnkeyring

package info (click to toggle)
inn2 2.5.3-3
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 11,348 kB
  • ctags: 8,681
  • sloc: ansic: 92,360; sh: 13,524; perl: 12,868; makefile: 2,973; yacc: 842; python: 342; lex: 266
file content (36 lines) | stat: -rw-r--r-- 811 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
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/bash
. /usr/lib/news/innshellvars

cd $PATHTMP

KEYSURL=ftp://ftp.isc.org/pub/pgpcontrol/PGPKEYS
KEYSFILE=PGPKEYS

KEYRING=${NEWSETC}/pgp/pubring.gpg

trap "rm -f $KEYSFILE" 0 1 2 15

rm -f ${KEYSFILE}
${GETFTP} ${KEYSURL}

test -f ${KEYSFILE} || exit 1

gpg --batch --no-permission-warning \
	--no-default-keyring --keyring=${KEYRING} --no-options \
	--allow-non-selfsigned-uid --fast-import ${KEYSFILE}

exit $$
# this does not work because gpg refuses to use RSA-style fingerprints

KEYSERVER=keyserver.linux.it

SERVERKEYS=$(grep fingerprint ${CTLFILE} \
	| sed -e 's/ //g' -e 's/.*[:=]/0x/' \
	| grep -v '^#')

for key in $SERVERKEYS; do
    gpg --batch --no-permission-warning --verbose \
	--no-default-keyring --keyring=${KEYRING} --no-options \
	--keyserver=${KEYSERVER} --recv-keys ${key}
done