lucacasonato / acme2

A Tokio and OpenSSL based ACMEv2 client for Rust.
https://docs.rs/acme2
Other
22 stars 7 forks source link

Add P-256 account key support #23

Open justinas opened 1 year ago

justinas commented 1 year ago

Fixes #22 by adding support for P-256 account keys (the default remains RSA).

Take this with a good amount of "I don't know what I'm doing here": I do not consider myself to be qualified to write cryptographic code. However, this passes both the included tests with pebble, and my bespoke integration tests with pebble through agnos. In any case, the worst we can do here is form an invalid signature, which the server will reject, I guess?

Took the liberty to do a minor refactoring, because my initial attempt to add P-256 was quite ugly; fixed a few Clippy lints while I was at it.