Commits

jpclizbe  committed 0374b3d

OID fixes for ECC -- force int64 use (fixes issue on 32-bit systems)

dbserver.ml - swap line order, so that we can guarantee that hashes
is the same length as keys, so that the List.map2 below will get lists
of the same length.
parsePGP.ml - force use of int64 in OID calculations. 32-bit systems
were using the wrong length and erroring

  • Participants
  • Parent commits a4fab18

Comments (0)

Files changed (3)

     checksums, etc) to key dump. This allows for information on the
     key dump ahead of download/import, and direct verification of checksums
     using md5sum -c <metadata-file>.  
+  - OID fixes for ECC -- force int64 use (fixes issue on 32-bit systems)
 
 1.1.4
   - Fix X-HKP-Results-Count so that limit=0 returns no results, but include
           let keys = lookup_keys request.search in
           let count = List.length keys in
           let keys = truncate request.limit keys in
+          let keys = clean_keys request keys in
           let hashes = List.map ~f:KeyHash.hash keys in
-          let keys = clean_keys request keys in
           if request.machine_readable then
             ("text/plain",
              count,
 
 let parse_ecdh_pubkey cin =
    let length = cin#read_int_size 1 in
-   let oid = sprintf "%x" (cin#read_int_size length) in
+   let oid = sprintf "%Lx" (cin#read_int64_size length) in
    let mpi = read_mpi cin in
    let kdf_length = cin#read_int_size 1 in
    let kdf_res = cin#read_int_size 1 in
 
  let parse_ecdsa_pubkey cin =
    let length = cin#read_int_size 1 in
-   let oid = sprintf "%x" (cin#read_int_size length) in
+   let oid = sprintf "%Lx" (cin#read_int64_size length) in
    let psize = oid_to_psize oid
    in
    psize