-
Notifications
You must be signed in to change notification settings - Fork 0
/
sponsor.lsp.template
executable file
·50 lines (44 loc) · 1.32 KB
/
sponsor.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
#!___NEWLISPPATH___
(load "wot.lsp")
(print "Content-type: text/html\n\n")
(set (quote sponsoremail) (CGI:get "sponsoremail"))
(set (quote applicantemail) (CGI:get "applicantemail"))
(wot:checkemailaddress sponsoremail)
(wot:checkemailaddress applicantemail)
(wot:verifypassword sponsoremail (CGI:get "sponsorpassword"))
(set (quote returnlist) (catch (wot:checktrust sponsoremail)))
(if (= (nth 0 returnlist) nil)
(begin
(CGI:put-page "sponsoruntrusted.html")
(exit)
)
)
(set (quote sponsorsecretkeyids) (catch (wot:listkeys sponsoremail wot:PUBPUBKEYRING wot:SECSECKEYRING wot:SECTRUSTDB)))
(set (quote applicantkeyids) (catch (wot:listkeys applicantemail wot:PUBPUBKEYRING wot:SECSECKEYRING wot:SECTRUSTDB)))
(if (not applicantkeyids)
(begin
(set (quote applicantkeyids) (catch (wot:makekey applicantemail wot:PUBPUBKEYRING wot:SECSECKEYRING wot:SECTRUSTDB)))
)
)
(dolist (x sponsorsecretkeyids)
(begin
(dolist (y applicantkeyids)
(begin
;(println "signing: " x " " y "<br>\n")
(set (quote signreturn) (catch (wot:signkey x y)))
)
)
)
)
(set (quote returnlist) (catch (wot:checktrust applicantemail)))
(if (!= (nth 0 returnlist) nil)
(begin
(CGI:put-page "applicanttrusted.html")
(exit)
)
(begin
(CGI:put-page "applicanttrustfailed.html")
(exit)
)
)
(exit)