sks-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Sks-devel] [PATCH] add fingerprint line to machine readable output


From: Stefan Tomanek
Subject: [Sks-devel] [PATCH] add fingerprint line to machine readable output
Date: Tue, 10 Sep 2013 23:29:43 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

With this change, an additional line is appended to each search result when
using the machine readable output. This line is prefixed with "fpr:" and
contains the fingerprint of the key returned, making it possible to distinguish
keys from each other before downloading them - even if a key id collision has
occured.

Signed-off-by: Stefan Tomanek <address@hidden>
---
 mRindex.ml |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/mRindex.ml b/mRindex.ml
index 366b704..9584571 100644
--- a/mRindex.ml
+++ b/mRindex.ml
@@ -151,6 +151,8 @@ let key_to_lines key =
                    key_expiry_string
                    (if (Index.is_revoked key) then "r" else "")
   in
+  (* In any case, add an additional line with the complete fingerprint *)
+  let fpr_line = sprintf "fpr:%s" fpr in
   let uid_lines =
     List.map ~f:(fun (uid,sigs) ->
       match uid.packet_type with
@@ -159,7 +161,7 @@ let key_to_lines key =
         | _ -> "???::::"
       ) uids
   in
-  key_line::uid_lines
+  key_line::fpr_line::uid_lines
 
 let keys_to_lines keys =
   let first = sprintf "info:%d:%d" mr_version (List.length keys) in
-- 
1.7.10.4

Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]