123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596 |
- guix authenticate --version
- sig="t-signature-$$"
- hash="t-hash-$$"
- rm -f "$sig" "$hash"
- trap 'rm -f "$sig" "$hash"' EXIT
- echo "2749f0ea9f26c6c7be746a9cff8fa4c2f2a02b000070dba78429e9a11f87c6eb" \
- > "$hash"
- guix authenticate rsautl -sign \
- -inkey "$abs_top_srcdir/tests/signing-key.sec" \
- -in "$hash" > "$sig"
- test -f "$sig"
- hash2="`guix authenticate rsautl -verify \
- -inkey $abs_top_srcdir/tests/signing-key.pub \
- -pubin -in $sig`"
- test "$hash2" = `cat "$hash"`
- hash2="` \
- cat "$hash" \
- | guix authenticate rsautl -sign \
- -inkey "$abs_top_srcdir/tests/signing-key.sec" \
- | guix authenticate rsautl -verify \
- -inkey $abs_top_srcdir/tests/signing-key.pub \
- -pubin`"
- test "$hash2" = `cat "$hash"`
- if guix authenticate rsautl -verify \
- -inkey "$abs_top_srcdir/tests/signing-key.pub" \
- -pubin -in /dev/null
- then false
- else true
- fi
- sed -i "$sig" \
- -e's|#[A-Z0-9]\{64\}#|#0000000000000000000000000000000000000000000000000000000000000000#|g'
- if guix authenticate rsautl -verify \
- -inkey "$abs_top_srcdir/tests/signing-key.pub" \
- -pubin -in "$sig"
- then false
- else true
- fi
- echo "5eff0b55c9c5f5e87b4e34cd60a2d5654ca1eb78c7b3c67c3179fed1cff07b4c" \
- > "$hash"
- LC_ALL=C
- export LC_ALL
- guix authenticate rsautl -sign \
- -inkey "$abs_top_srcdir/tests/signing-key.sec" \
- -in "$hash" > "$sig"
- guix authenticate rsautl -verify \
- -inkey "$abs_top_srcdir/tests/signing-key.pub" \
- -pubin -in "$sig"
- hash2="`guix authenticate rsautl -verify \
- -inkey $abs_top_srcdir/tests/signing-key.pub \
- -pubin -in $sig`"
- test "$hash2" = `cat "$hash"`
|