Commits

jpclizbe  committed 496fa83

op=hget now supports option=mr for completeness (BB issue #17)

  • Participants
  • Parent commits 21c4e07

Comments (0)

Files changed (2)

     as a separate patch while to be install during 'make'.
   - Upgraded to cryptlib-1.7, Added the SHA-3 algorithm, Keccek
   - Option max_matches was setting max_internal_matches. Fixed (BB issue #4)
+  - op=hget now supports option=mr for completeness (BB issue #17)
 
 1.1.4
   - Fix X-HKP-Results-Count so that limit=0 returns no results, but include
             else key
           in
           let keystr = Key.to_string key in
-          let aakeys = Armor.encode_pubkey_string keystr in
-          ("text/html; charset=UTF-8",
-           1,
-           HtmlTemplates.page
-             ~title:(sprintf "Public Key Server -- Get ``%s ''" hash_str)
-             ~body:(sprintf "\r\n<pre>\r\n%s\r\n</pre>\r\n" aakeys)
-          )
+          let aakey = Armor.encode_pubkey_string keystr
+          in
+          if request.machine_readable then
+            ("application/pgp-keys; charset=UTF-8", 1, aakey)
+          else
+            ("text/html; charset=UTF-8",
+             1,
+             HtmlTemplates.page
+               ~title:(sprintf "Public Key Server -- Get ``%s ''" hash_str)
+               ~body:(sprintf "\r\n<pre>\r\n%s\r\n</pre>\r\n" aakey)
+            )
 
       | Index | VIndex ->
           (* VIndex requests are treated indentically to index requests *)