update offline tool; fix dune-workspace
This commit is contained in:
parent
df02bf0f48
commit
9c9414e96b
11 changed files with 78 additions and 126 deletions
|
|
@ -53,17 +53,17 @@ module Arg = struct
|
|||
()
|
||||
|
||||
let eddsa_pub =
|
||||
let parser s = Crypto.EddsaPublicKey.of_b32 s in
|
||||
let parser s = Eddsa.pub_of_b32 s in
|
||||
let pp fmt key =
|
||||
let s = Crypto.EddsaPublicKey.to_b32 key in
|
||||
let s = Eddsa.pub_to_b32 key in
|
||||
Fmt.pf fmt "%s" s
|
||||
in
|
||||
Arg.Conv.make ~docv:"eddsa public key argument" ~parser ~pp ()
|
||||
|
||||
let rsa_pub =
|
||||
let parser s = Crypto.RsaPublicKey.of_b32 s in
|
||||
let parser s = Rsa.pub_of_b32 s in
|
||||
let pp fmt key =
|
||||
let s = Crypto.RsaPublicKey.to_b32 key in
|
||||
let s = Rsa.pub_to_b32 key in
|
||||
Fmt.pf fmt "%s" s
|
||||
in
|
||||
Arg.Conv.make ~docv:"rsa public key argument" ~parser ~pp ()
|
||||
|
|
@ -155,11 +155,11 @@ let revoke_denom_cmd =
|
|||
match is_rsa_pub with
|
||||
| false -> Ok v
|
||||
| true -> (
|
||||
match Crypto.RsaPublicKey.of_b32 v with
|
||||
match Rsa.pub_of_b32 v with
|
||||
| Error e -> Error e
|
||||
| Ok rsa_pub ->
|
||||
let h = Crypto.DenominationHash.hash_of_rsa rsa_pub in
|
||||
let s = Crypto.DenominationHash.to_b32 h in
|
||||
let h = Hash.DenominationHash.hash_of_rsa rsa_pub in
|
||||
let s = Hash.DenominationHash.to_b32 h in
|
||||
Ok s)
|
||||
in
|
||||
match res with
|
||||
|
|
@ -173,8 +173,8 @@ let test_denomination_hash_cmd =
|
|||
Cmd.make (Cmd.info "denomination-hash" ~doc)
|
||||
@@
|
||||
let+ rsa_pub = rsa_pub in
|
||||
let h = Crypto.DenominationHash.hash_of_rsa rsa_pub in
|
||||
let s = Crypto.DenominationHash.to_b32 h in
|
||||
let h = Hash.DenominationHash.hash_of_rsa rsa_pub in
|
||||
let s = Hash.DenominationHash.to_b32 h in
|
||||
Fmt.pr "%s@." s; Ok ()
|
||||
|
||||
let revoke_signkey_cmd =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue