Lines Matching +full:part +full:- +full:number
2 # SPDX-License-Identifier: GPL-2.0
4 # extract-mod-sig <part> <module-file>
7 # section to stdout. Part is the bit to be written and is one of:
9 # -0: The unsigned module, no signature data at all
10 # -a: All of the signature data, including magic number
11 # -d: Just the descriptor values as a sequence of numbers
12 # -n: Just the signer's name
13 # -k: Just the key ID
14 # -s: Just the crypto signature or PKCS#7 message
19 die "Format: $0 -[0adnks] module-file >out\n"
22 my $part = $ARGV[0];
42 die "The file is too short to have a sig magic number and descriptor\n"
46 # Check for the magic number and extract the information block
48 my $p = $len - length($magic_number);
51 die "Magic number not found at $len\n"
53 print STDERR "Found magic number at $len\n";
55 $p -= 12;
77 $p -= $sig_len;
79 $p -= $kid_len;
81 $p -= $name_len;
111 if ($part eq "-0") {
115 } elsif ($part eq "-a") {
116 # All of the signature data, including magic number
119 } elsif ($part eq "-d") {
122 } elsif ($part eq "-n") {
128 } elsif ($part eq "-k") {
134 } elsif ($part eq "-s") {