blob: d41a90cea3e8d1bf6c350f475df81217c62f47cd (
plain)
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
|
#!/bin/sh
. ./config
echo 'Today is :'
date
echo '(check if the date is correct and press enter)'
read z
chmod 700 "$GPGHOMEDIR"
echo "Generate key :"
gpg --homedir "$GPGHOMEDIR" --batch --gen-key "$INPUTDIR/board.batch"
echo "Public key :"
gpg --homedir "$GPGHOMEDIR" --list-keys
gpg --homedir "$GPGHOMEDIR" --list-keys --fingerprint > "$PUBDIR/mageia-board-fingerprint.txt"
gpg --homedir homedir --export -a > "$pubkey"
echo "Secret key :"
gpg --homedir "$GPGHOMEDIR" --list-secret-keys
gpg --homedir homedir --export-secret-keys -a > "$seckey"
rm -Rf "$GPGHOMEDIR"
echo "Generate passphrase"
./random-passphrase > "$passphrase"
gpg -c --passphrase-file "$passphrase" "$seckey"
rm -f "$seckey"
#TODO : split secret key using ssss-split
|