Skip to content

Commit

Permalink
hack: use Rsa.priv_of_primes
Browse files Browse the repository at this point in the history
Rsa.priv rejects RSA private keys generated by Google Cloud.
  • Loading branch information
mattjbray committed May 11, 2020
1 parent ccf3fec commit db01a2a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/private_key.ml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ module Asn = struct
let f (v, (n, (e, (d, (p, (q, (dp, (dq, (q', other))))))))) =
match (v, other) with
| (0, None) ->
begin match Rsa.priv ~e ~d ~n ~p ~q ~dp ~dq ~q' with
begin match Rsa.priv_of_primes ~e ~p ~q with
| Ok p -> p
| Error (`Msg m) -> parse_error "bad RSA private key %s" m
end
Expand Down

0 comments on commit db01a2a

Please sign in to comment.