mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-27 01:48:17 +00:00
28 lines
458 B
Plaintext
28 lines
458 B
Plaintext
|
#!/bin/bash
|
||
|
|
||
|
TOOLDIR=$(dirname $0)
|
||
|
|
||
|
TYPE=$1
|
||
|
FILE=$2
|
||
|
shift
|
||
|
shift
|
||
|
SECKEYS=$*
|
||
|
|
||
|
COMMITS=""
|
||
|
|
||
|
for seckey in $SECKEYS; do
|
||
|
commit=$( $TOOLDIR/keyctl commit $TYPE $FILE $seckey )
|
||
|
COMMITS="$COMMITS $commit"
|
||
|
done
|
||
|
|
||
|
global_commit=$( $TOOLDIR/keyctl global_commit $COMMITS )
|
||
|
|
||
|
SIGS=""
|
||
|
|
||
|
for seckey in $SECKEYS; do
|
||
|
sig=$( $TOOLDIR/keyctl sign $TYPE $FILE $global_commit $seckey )
|
||
|
SIGS="$SIGS $sig"
|
||
|
done
|
||
|
|
||
|
$TOOLDIR/keyctl global_sign $FILE $global_commit $SIGS
|