- A6F142145B954FC7938DF34435542376D3D7D2609AEC6B7367AD49414E3730960EC4E213B6AA0EDE2C8A4714F44224970738C8DA938B6C1AE426188491F22C06
+ F0D41124D72A3B364F70EA8DD1F9A434230F9BA965C89C3C48DD78071D7AC59C68BA407EF4818F326339BCE5A3261C5BA10B8DE8612E7C0778513B928E681988
ffa/contrib/litmus/litmus.sh
(42 . 6)(42 . 13)
13 # All Other Cases:
14 RET_EGGOG=-1
15
16 # Verify that all of the necessary external programs in fact exist:
17 for i in $EXTERNALS
18 do
19 command -v $i >/dev/null && continue || \
20 { echo "$i is required but was not found! Please install it." >&2 ; \
21 exit $RET_EGGOG; }
22 done
23
24 # Terminations:
25
(216 . 14)(223 . 6)
27 exit $RET_EGGOG
28 fi
29
30 # Verify that all of the necessary external programs in fact exist:
31 for i in $EXTERNALS
32 do
33 command -v $i >/dev/null && continue || \
34 { echo "$i is required but was not found! Please install it." >&2 ; \
35 exit $RET_EGGOG; }
36 done
37
38 # 'ASCII-Armoured' PGP signatures have mandatory start and end markers:
39 START_MARKER="^\-\-\-\-\-BEGIN PGP SIGNATURE\-\-\-\-\-"
40 END_MARKER="^\-\-\-\-\-END PGP SIGNATURE\-\-\-\-\-"
(458 . 6)(457 . 7)
42 # Calculate length (bytes) of the ASN turd for the digest used in the sig:
43 ASN_LEN=$((${#ASN} / 2))
44
45 # Read the hashed and unhashed sections :
46
47 # Hashed Section Length
48 get_sig_bytes 2
(471 . 7)(471 . 7)
50 sig_hashed=$r
51
52 # Unhashed Section Length
53 get_sig_bytes 1
54 get_sig_bytes 2
55 hex_to_int
56 sig_unhashed_len=$r
57
(491 . 16)(491 . 7)
59 # Convert to upper case
60 hash=$(echo $hash | tr 'a-z' 'A-Z')
61
62 # Parse the RSA Signature portion of the Sig file:
63
64 # RSA Packet Length (how many bytes to read)
65 get_sig_bytes 1
66 hex_to_int
67 rsa_packet_len=$r
68
69 # The RSA Packet itself
70 get_sig_bytes $rsa_packet_len
71 rsa_packet=$r
72 # Read and validate digest prefix :
73
74 # Digest Prefix (2 bytes)
75 get_sig_bytes 2