Commits

Kristian Fiskerstrand committed cc9cf7c

Fix index.mli for external SigInfo

  • Participants
  • Parent commits 72673dc

Comments (0)

Files changed (1)

 
 diff -r 3c75386bc7ce CHANGELOG
 --- a/CHANGELOG	Sat Oct 27 23:15:53 2012 +0200
-+++ b/CHANGELOG	Sun Oct 28 18:35:43 2012 +0100
++++ b/CHANGELOG	Sun Oct 28 19:05:42 2012 +0100
 @@ -3,6 +3,11 @@
      from self-signatures on the key's UIDs. In addition, instead of 8-digit
      key IDs, index entries now return the most specific key ID possible:
    - Fix X-HKP-Results-Count so that limit=0 returns no results, but include
 diff -r 3c75386bc7ce Makefile
 --- a/Makefile	Sat Oct 27 23:15:53 2012 +0200
-+++ b/Makefile	Sun Oct 28 18:35:43 2012 +0100
++++ b/Makefile	Sun Oct 28 19:05:42 2012 +0100
 @@ -80,11 +80,11 @@
  ROBJS=$(ROBJS.bc:.cmo=.cmx)
  
  	sksdump.cmo incdump.cmo dbserver.cmo reconComm.cmo recoverList.cmo \
 diff -r 3c75386bc7ce dbserver.ml
 --- a/dbserver.ml	Sat Oct 27 23:15:53 2012 +0200
-+++ b/dbserver.ml	Sun Oct 28 18:35:43 2012 +0100
++++ b/dbserver.ml	Sun Oct 28 19:05:42 2012 +0100
 @@ -170,7 +170,13 @@
    (** returns list of keys readied for presentation *)
    let clean_keys request keys =
              else key
 diff -r 3c75386bc7ce fixkey.ml
 --- a/fixkey.ml	Sat Oct 27 23:15:53 2012 +0200
-+++ b/fixkey.ml	Sun Oct 28 18:35:43 2012 +0100
++++ b/fixkey.ml	Sun Oct 28 19:05:42 2012 +0100
 @@ -24,6 +24,7 @@
  open MoreLabels
  open Common
  
  module Map = PMap.Map
  
-@@ -144,29 +145,81 @@
+@@ -144,29 +145,86 @@
    try ignore (ParsePGP.parse_pubkey_info pack); true
    with e -> false
  
 +  | Some i -> (match (siginfo.sig_creation_time, siginfo.sig_expiration_time) with 
 +                                      | (None, _)| (_, None) -> true
 +                                      | (Some x, Some y) -> 
-+                                        if i = "9710b89bca57ad7c"
++                                        let keyid = Fingerprint.keyid_to_string ~short:false i in 
++                                        plerror 10 "Signature %s" keyid;
++                                        if keyid = "9710B89BCA57AD7C" (* PGP Global Directory *) 
++                                          or keyid = "D2BB0D0165D0FD58" (* CA Cert *)
++                                          or keyid = "6EA7FB4DE0BB4BCD" (* Tele.Ring Robo CA *)
++                                          or keyid = "10581685C521097E" (* Toehold robot CA *)
 +                                         then (if (Int64.to_float (Int64.add x y)) < today then false else true) 
 +                                         else true)
 +  | None -> false
 + presentation_filter false key
 diff -r 3c75386bc7ce fixkey.mli
 --- a/fixkey.mli	Sat Oct 27 23:15:53 2012 +0200
-+++ b/fixkey.mli	Sun Oct 28 18:35:43 2012 +0100
++++ b/fixkey.mli	Sun Oct 28 19:05:42 2012 +0100
 @@ -15,4 +15,8 @@
  val drop_bad_sigs : Packet.packet list -> Packet.packet list
  val sig_filter_sigpair :
 +
 diff -r 3c75386bc7ce index.ml
 --- a/index.ml	Sat Oct 27 23:15:53 2012 +0200
-+++ b/index.ml	Sun Oct 28 18:35:43 2012 +0100
++++ b/index.ml	Sun Oct 28 19:05:42 2012 +0100
 @@ -27,40 +27,12 @@
  open Packet
  open Request
    List.stable_sort list
 diff -r 3c75386bc7ce index.mli
 --- a/index.mli	Sat Oct 27 23:15:53 2012 +0200
-+++ b/index.mli	Sun Oct 28 18:35:43 2012 +0100
-@@ -1,7 +1,4 @@
++++ b/index.mli	Sun Oct 28 19:05:42 2012 +0100
+@@ -1,42 +1,39 @@
 -type siginfo
 -val empty_siginfo : unit -> siginfo
  val keyinfo_header : Request.request -> string
 -val sig_to_siginfo : Packet.packet -> siginfo
- val sort_siginfo_list : siginfo list -> siginfo list
- val is_selfsig : keyid:string -> siginfo -> bool
- val is_primary : keyid:string -> Packet.packet * siginfo list -> bool
+-val sort_siginfo_list : siginfo list -> siginfo list
+-val is_selfsig : keyid:string -> siginfo -> bool
+-val is_primary : keyid:string -> Packet.packet * siginfo list -> bool
+-val max_selfsig_time : keyid:string -> 'a * siginfo list -> float
++val sort_siginfo_list : SigInfo.siginfo list -> SigInfo.siginfo list
++val is_selfsig : keyid:string -> SigInfo.siginfo -> bool
++val is_primary : keyid:string -> Packet.packet * SigInfo.siginfo list -> bool
++val max_selfsig_time : keyid:string -> 'a * SigInfo.siginfo list -> float
+ val split_list : f:('a -> bool) -> 'a list -> 'a list * 'a list
+ val move_primary_to_front :
+   keyid:string ->
+-  (Packet.packet * siginfo list) list -> (Packet.packet * siginfo list) list
+-val convert_sigpair : 'a * Packet.packet list -> 'a * siginfo list
++  (Packet.packet * SigInfo.siginfo list) list -> (Packet.packet * SigInfo.siginfo list) list
++val convert_sigpair : 'a * Packet.packet list -> 'a * SigInfo.siginfo list
+ val blank_datestr : string
+ val no_datestr : string
+ val datestr_of_int64 : int64 -> string
+ val siginfo_to_lines :
+   get_uid:(string -> string option) ->
+   ?key_creation_time:int64 ->
+-  Request.request -> string -> float -> siginfo -> string list
++  Request.request -> string -> float -> SigInfo.siginfo -> string list
+ val selfsigs_to_lines :
+   Request.request ->
+   int64 -> string -> Packet.packet list -> float -> string list
+ val uid_to_lines :
+   get_uid:(string -> string option) ->
+   Request.request ->
+-  int64 -> string -> float -> Packet.packet * siginfo list -> string list
++  int64 -> string -> float -> Packet.packet * SigInfo.siginfo list -> string list
+ val uids_to_lines :
+   get_uid:(string -> string option) ->
+   Request.request ->
+   int64 ->
+-  string -> (Packet.packet * siginfo list) list -> float -> string list
++  string -> (Packet.packet * SigInfo.siginfo list) list -> float -> string list
+ val key_packet_to_line :
+   is_subkey:bool -> Packet.pubkeyinfo -> string -> string * string
+ val subkey_to_lines :
+-  Request.request -> float -> Packet.packet * siginfo list -> string list
++  Request.request -> float -> Packet.packet * SigInfo.siginfo list -> string list
+ val subkeys_to_lines :
+   Request.request ->
+-  (Packet.packet * siginfo list) list -> float -> string list
++  (Packet.packet * SigInfo.siginfo list) list -> float -> string list
+ val extract : f:('a -> bool) -> 'a list -> 'a option * 'a list
+ val move_to_front : f:('a -> bool) -> 'a list -> 'a list
+ val get_uid :
+@@ -47,7 +44,7 @@
+ val key_to_lines_verbose :
+   get_uids:(string -> (Packet.packet * Packet.packet list) list) ->
+   Request.request -> Packet.packet list -> string -> string list
+-val sig_is_revok : siginfo -> bool
++val sig_is_revok : SigInfo.siginfo -> bool
+ val is_revoked : Packet.packet list -> bool
+ val key_to_lines_normal :
+   Request.request -> Packet.packet list -> string -> string list
 diff -r 3c75386bc7ce request.ml
 --- a/request.ml	Sat Oct 27 23:15:53 2012 +0200
-+++ b/request.ml	Sun Oct 28 18:35:43 2012 +0100
++++ b/request.ml	Sun Oct 28 19:05:42 2012 +0100
 @@ -45,6 +45,7 @@
                   machine_readable: bool;
                   clean: bool;
              | ("op","x-stats") -> {request with kind = Stats };
 diff -r 3c75386bc7ce request.mli
 --- a/request.mli	Sat Oct 27 23:15:53 2012 +0200
-+++ b/request.mli	Sun Oct 28 18:35:43 2012 +0100
++++ b/request.mli	Sun Oct 28 19:05:42 2012 +0100
 @@ -11,6 +11,7 @@
    machine_readable : bool;
    clean : bool;
  val comma_rxp : Str.regexp
 diff -r 3c75386bc7ce sigInfo.ml
 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
-+++ b/sigInfo.ml	Sun Oct 28 18:35:43 2012 +0100
++++ b/sigInfo.ml	Sun Oct 28 19:05:42 2012 +0100
 @@ -0,0 +1,132 @@
 +(***********************************************************************)
 +(* sigInfo.ml                                                           *)
 +  
 diff -r 3c75386bc7ce sigInfo.mli
 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
-+++ b/sigInfo.mli	Sun Oct 28 18:35:43 2012 +0100
++++ b/sigInfo.mli	Sun Oct 28 19:05:42 2012 +0100
 @@ -0,0 +1,14 @@
 +type siginfo = {
 +  mutable userid : string option;