1 |
#!/bin/sh |
2 |
|
3 |
. ./config |
4 |
|
5 |
echo 'Today is :' |
6 |
date |
7 |
echo '(check if the date is correct and press enter)' |
8 |
read z |
9 |
|
10 |
mkdir -p "$GPGHOMEDIR" |
11 |
chmod 700 "$GPGHOMEDIR" |
12 |
|
13 |
echo "Generate key :" |
14 |
gpg --homedir "$GPGHOMEDIR" --batch --gen-key "$INPUTDIR/board.batch" |
15 |
|
16 |
echo "Public key :" |
17 |
gpg --homedir "$GPGHOMEDIR" --list-keys |
18 |
gpg --homedir "$GPGHOMEDIR" --list-keys --fingerprint > "$PUBDIR/mageia-board-fingerprint.txt" |
19 |
gpg --homedir homedir --export -a > "$pubkey" |
20 |
|
21 |
echo "Secret key :" |
22 |
gpg --homedir "$GPGHOMEDIR" --list-secret-keys |
23 |
gpg --homedir homedir --export-secret-keys -a > "$seckey" |
24 |
|
25 |
rm -Rf "$GPGHOMEDIR" |
26 |
|
27 |
echo "Generate passphrase" |
28 |
./random-passphrase > "$passphrase" |
29 |
gpg -c --no-use-agent --passphrase-file "$passphrase" "$seckey" |
30 |
rm -f "$seckey" |
31 |
|
32 |
./split-passphrase |
33 |
|