mirror of
https://github.com/Augustin-FL/building-pfsense-iso-from-source.git
synced 2026-07-03 20:01:35 +00:00
use official FreeBSD sign.sh script
This commit is contained in:
17
README.md
17
README.md
@@ -138,22 +138,7 @@ openssl genrsa -out repo.key 2048
|
|||||||
chmod 0400 repo.key
|
chmod 0400 repo.key
|
||||||
openssl rsa -in repo.key -out repo.pub -pubout
|
openssl rsa -in repo.key -out repo.pub -pubout
|
||||||
printf "function: sha256\nfingerprint: `sha256 -q repo.pub`\n" > fingerprint
|
printf "function: sha256\nfingerprint: `sha256 -q repo.pub`\n" > fingerprint
|
||||||
```
|
curl -o /root/sign/sign.sh https://raw.githubusercontent.com/freebsd/pkg/master/scripts/sign.sh
|
||||||
|
|
||||||
Then create a script file `sign.sh` in the `/root/sign/` folder.
|
|
||||||
```
|
|
||||||
#!/bin/sh
|
|
||||||
read -t 2 sum
|
|
||||||
[ -z "$sum" ] && exit 1
|
|
||||||
echo SIGNATURE
|
|
||||||
echo -n $sum | openssl dgst -sign /root/sign/repo.key -sha256 -binary
|
|
||||||
echo
|
|
||||||
echo CERT
|
|
||||||
cat /root/sign/repo.pub
|
|
||||||
echo END
|
|
||||||
```
|
|
||||||
Finally, ensure that this script is executable:
|
|
||||||
```
|
|
||||||
chmod +x /root/sign/sign.sh
|
chmod +x /root/sign/sign.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user