-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplottrust.lsp.template
executable file
·107 lines (107 loc) · 3.64 KB
/
plottrust.lsp.template
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
#!___NEWLISPPATH___
(load "___CGIBINPATH___/wot.lsp")
(set (quote runstring) (string "___GPGPATH___ --with-colons --homedir ___KEYRINGDIRPATH___ --no-default-keyring --no-auto-key-locate --keyring ___KEYRINGDIRPATH___/pubpubring.gpg --secret-keyring ___KEYRINGDIRPATH___/pubsecring.gpg --trustdb-name ___KEYRINGDIRPATH___/pubtrustdb.gpg --check-sigs"))
(set (quote runitlist) (catch (wot:runit runstring nil 60)))
(set (quote keylist) (find-all {((?msU)^pub.*(?=^pub))} (string (nth 1 runitlist) "\npub") $1))
(set (quote infolist) (list))
(dolist (x keylist)
(set (quote linelist) (parse x "\n"))
; get fingerprint, email, list of sigs
(set (quote truststring) nil)
(set (quote fingerprintstring) nil)
(set (quote siglistlist) (list "siglist"))
(set (quote emailstring) nil)
(for (mindex 0 (- (length linelist) 1) 1)
(begin
(set (quote parselist) (parse (nth mindex linelist) ":"))
(cond
((= (length parselist) 0)
(begin
)
)
((= (nth 0 parselist) "pub")
(begin
(set (quote trustlist) (list "trust" (nth 1 parselist) (nth 4 parselist)))
)
)
((= (nth 0 parselist) "fpr")
(begin
;(print (string "found fpr in (" parselist ")\n"))
(set (quote fingerprintlist) (list "fingerprint" (nth 9 parselist)))
)
)
((= (nth 0 parselist) "uid")
(begin
;(print (string "found uid in (" parselist ")\n"))
(set (quote emaillist) (list "uid" (nth 9 parselist)))
)
)
((= (nth 0 parselist) "sig")
(begin
;(print (string "found sig in (" parselist ")\n"))
(set (quote siglist) (list (nth 1 parselist) (nth 4 parselist) (nth 9 parselist) (nth 12 parselist)))
;(print (string "(nth 11 parselist: (" (nth 11 parselist) ")\n"))
;(print (string "(nth 12 parselist: (" (nth 12 parselist) ")\n"))
;(print (string "(nth 13 parselist: (" (nth 13 parselist) ")\n"))
(set (quote siglistlist) (append siglistlist (list siglist)))
;(print (string "siglistlist: (" siglistlist ")\n"))
)
)
)
)
)
(set (quote thislist) (list trustlist fingerprintlist emaillist siglistlist))
;(print (string "thislist: (" thislist ")\n"))
(set (quote infolist) (append infolist (list thislist)))
)
;(print (string "infolist: (" infolist ")\n"))
(set (quote signersignedlist) (list))
(dolist (t infolist)
;(print (string "processing t: (" t ")\n"))
(print (string "\n"))
(set (quote signedlist) (list))
(dolist (tfields t)
(cond
((= (nth 0 tfields) "siglist")
(print (string "signed by: \n"))
(dolist (sigfields (rest tfields))
(begin
(if (= (nth 0 sigfields) "!")
(begin
(print (string " " (rest sigfields) " \n"))
)
)
)
)
)
)
(cond
((= (nth 0 tfields) "trust")
(begin
(print (string "longid: " (nth 2 tfields) " "))
;(print (string "found trust in (" tinfo ")\n"))
;(set (quote truststring) (nth 1 tinfo))
(cond
((= (nth 1 tfields) "-")
(begin
(print (string "untrusted "))
)
)
( (ref (nth 1 tfields) (quote ("f" "u")))
(begin
(if (= (nth 1 tfields) "u")
(begin
(print (string "ultimately "))
)
)
(print (string "trusted, \n"))
)
)
)
)
)
)
)
(print (string "\n"))
)
(exit)