[Pkg-sks-commit] r76 - sks/trunk/sks/debian/patches

chrism at alioth.debian.org chrism at alioth.debian.org
Thu Jun 19 14:51:26 UTC 2008


Author: chrism
Date: 2008-06-19 14:51:25 +0000 (Thu, 19 Jun 2008)
New Revision: 76

Added:
   sks/trunk/sks/debian/patches/506_show_revoked
Log:
[project @ 77]
Show revoked status in non-verbose index

Original author: weasel
Date: 2003-12-09 14:41:29.362351+00:00

Added: sks/trunk/sks/debian/patches/506_show_revoked
===================================================================
--- sks/trunk/sks/debian/patches/506_show_revoked	                        (rev 0)
+++ sks/trunk/sks/debian/patches/506_show_revoked	2008-06-19 14:51:25 UTC (rev 76)
@@ -0,0 +1,58 @@
+diff -ruN sks-1.0.6-old/htmlTemplates.ml sks-1.0.6/htmlTemplates.ml
+--- sks-1.0.6-old/htmlTemplates.ml	Tue Dec  9 15:26:27 2003
++++ sks-1.0.6/htmlTemplates.ml	Tue Dec  9 15:37:51 2003
+@@ -77,17 +77,18 @@
+     | 17 -> "D"  (* DSA *)
+     | _  -> "?"  (* NoClue *)
+ 
+-let keyinfo_pks pki ~keyid ~link ~userids = 
++let keyinfo_pks pki revoked ~keyid ~link ~userids = 
+   let tm = gmtime (Int64.to_float pki.pk_ctime) in
+   let algo = keyalgorithm_text pki in
+   let base = 
+-    sprintf "pub  %4d%s/<a href=\"%s\">%8s</a> %4d/%02d/%02d "
++    sprintf "pub  %4d%s/<a href=\"%s\">%8s</a> %4d/%02d/%02d%s "
+       pki.pk_keylen algo link keyid 
+       (1900 + tm.tm_year) 
+       (tm.tm_mon + 1) 
+       tm.tm_mday 
++      (if revoked then " *** KEY REVOKED ***\r\n                              " else "")
+   in
+-  let uidstr = String.concat ~sep:"\r\n                              " userids in
++  let uidstr = String.concat ~sep:"\r\n                               " userids in
+   base ^ uidstr
+ 
+ 
+diff -ruN sks-1.0.6-old/index.ml sks-1.0.6/index.ml
+--- sks-1.0.6-old/index.ml	Tue Dec  9 15:26:27 2003
++++ sks-1.0.6/index.ml	Tue Dec  9 15:26:28 2003
+@@ -502,6 +502,19 @@
+ (* old style key index **********************************************)
+ (********************************************************************)
+ 
++let sig_is_revok siginfo =
++  match siginfo.sigtype with
++    | 0x20 | 0x28 | 0x30 -> true
++    | _ -> false
++
++let is_revoked key = 
++  let pkey = KeyMerge.key_to_pkey key in
++  let selfsigs = pkey.KeyMerge.selfsigs in
++  List.exists ~f:(fun sign -> 
++                   sig_is_revok (sig_to_siginfo sign)
++                 )
++    selfsigs
++
+ (** oldstyle index lines *)
+ let key_to_lines_normal request key = 
+   try
+@@ -524,7 +537,8 @@
+     let userids = match userids with [] -> []
+       | hd::tl -> (sprintf "<a href=\"%s\">%s</a>" ilink hd)::tl in
+     let pki = ParsePGP.parse_pubkey_info (List.hd key) in
+-    let keystr = HtmlTemplates.keyinfo_pks pki 
++    let revoked = is_revoked key in
++    let keystr = HtmlTemplates.keyinfo_pks pki revoked 
+ 		   ~keyid:keyid_short ~link ~userids in
+     let lines = [] in
+     let lines = 




More information about the Pkg-sks-commit mailing list