Commit Graph

81 Commits

Author SHA1 Message Date
Kevin Wang 5656412698 Add public `fn Account::id` 2024-10-23 15:33:32 +00:00
Nick Spain e83836b719 Retry bad nonce errors after generating a new nonce
Retry `urn:ietf:params:acme:error:badNonce` errors as they are defined
as retryable[^1]. Requests failing with a bad nonce error will be
retried three time retried three times before the failure is returned
to the caller.

This implenments the `BytesBody` trait for `bytes::Bytes` as we need
to consume the response body to be able check if the failure was due
to a bad nonce which required parsing the body. The body is only
consumed if the response status is bad request, in all other cases the
body is still lazily consumable.

[^1]: https://datatracker.ietf.org/doc/html/rfc8555/#section-6.5
2024-09-17 12:28:35 +00:00
Dirkjan Ochtman 24a877d187 Add missing Send bound 2024-07-16 23:28:57 +02:00
Dirkjan Ochtman 42dc6fa6b7 Add some basic serde tests 2024-07-16 20:47:38 +02:00
Luke Frisken 4a9b8703d9 Add ChallengeType::Other variant 2024-07-16 20:47:38 +02:00
Dirkjan Ochtman da55daaca9 Prefer aws-lc-rs if fips is enabled 2024-07-16 20:47:38 +02:00
Dirkjan Ochtman 126c0a3161 Make HttpClient independent from hyper 2024-07-16 20:47:38 +02:00
Dirkjan Ochtman 2047a9d579 Centralize body extraction 2024-07-16 20:47:38 +02:00
Dirkjan Ochtman 45102409d5 Use http dependency directly 2024-07-16 20:47:38 +02:00
Dirkjan Ochtman 5f78c2a6cb Align default for both features with default features 2024-07-16 20:47:38 +02:00
Dirkjan Ochtman 8e7871cbba Deduplicate Key constructor code 2024-07-16 20:47:38 +02:00
Dirkjan Ochtman 257a958a0a Deduplicate EcdsaKeyPair construction 2024-07-16 20:47:38 +02:00
Dirkjan Ochtman e0ac09439e Create inline module for crypto primitives 2024-07-16 20:47:38 +02:00
Dirkjan Ochtman 3679fc3eb2 Isolate ring_like imports 2024-07-16 20:47:38 +02:00
Sajjad (Sage) Pourali a9c8fc4dbc
Add aws_lc_rs feature and set it as default (#56) 2024-07-16 09:39:53 +02:00
Dirkjan Ochtman fcb735c5d8 Add Order::into_parts() method 2024-07-01 10:30:56 +02:00
Dirkjan Ochtman 10ee80b0bb Remove unused lifetime in Account::new_order() 2024-07-01 10:30:56 +02:00
Dirkjan Ochtman 0e67ae2e9d Add Account::order() method to fetch pre-existing order 2024-07-01 10:30:56 +02:00
Luke Frisken efb83b464a
Update to hyper dependency to version 1 (#50) 2024-06-27 13:04:02 +02:00
Dirkjan Ochtman 5e12971830
Merge changes from 0.4.x 2024-02-05 15:54:20 +01:00
Dirkjan Ochtman eac4f43020 Proactively add other new fields 2024-02-05 15:46:49 +01:00
Dirkjan Ochtman 601330bc82 Make DirectoryUrls::revoke_cert optional 2024-02-05 15:46:49 +01:00
Dirkjan Ochtman e7fcd3c3b9 Clarify usage of AccountCredentials::urls 2024-02-05 15:46:49 +01:00
Dirkjan Ochtman d36102c30a Make Problem fields optional 2024-01-31 14:30:40 +01:00
Deftware 8290a95649
Add certificate revocation (#38) 2024-01-29 16:18:25 +01:00
Deftware 287fa2469f Use 'Self' instead of 'LetsEncrypt' in pattern matching 2024-01-22 14:06:04 +01:00
Deftware 9c96fb26a4 Add ZeroSSL endpoints 2024-01-22 14:06:04 +01:00
Dirkjan Ochtman f73cadba4d Update to ring 0.17 2023-10-30 09:57:39 +01:00
Dirkjan Ochtman 7aa0d46294 Only encode/decode key bytes for (de)serialization 2023-08-02 11:21:50 +02:00
Dirkjan Ochtman 3d87755f30 Stop storing private key bytes in Key type 2023-08-02 11:21:50 +02:00
Dirkjan Ochtman 803e302442 Add a direct constructor for account bits 2023-08-02 11:21:50 +02:00
Dirkjan Ochtman 0c7adf93df Add tests for credential deserialization 2023-08-02 11:21:50 +02:00
Dirkjan Ochtman 11c231bace Only provide AccountCredentials at account creation time 2023-08-02 11:21:50 +02:00
Sajjad 45e73b1cc5 Adding Send trait to HttpClient response 2023-07-27 06:26:49 +02:00
Dirkjan Ochtman a8ccff7a1c Provide better error message after failing to acquire nonce 2023-07-26 10:35:38 +02:00
Dirkjan Ochtman c0b449dd52 Extract Client::nonce() method 2023-07-26 10:35:38 +02:00
Joe Grund 4a33aae615 Derive `Clone` `Copy` for simple enums
Signed-off-by: Joe Grund <jgrund@whamcloud.io>
2023-06-20 10:30:50 +02:00
Daniel Bloom 382aada615
Replace `ResponseFuture` with `Box<dyn>` (#28) 2023-06-14 13:21:31 +02:00
Dirkjan Ochtman 37d742dce6 Add some bounds for HttpClient trait 2023-06-02 17:31:53 +02:00
Dirkjan Ochtman fc708c325d Add blanket HttpClient impl for hyper::Client 2023-05-31 10:17:21 +02:00
Dirkjan Ochtman 1aa770c2de Make hyper-rustls dependency optional 2023-05-31 10:17:21 +02:00
Dirkjan Ochtman ae2b5aea98 Expose API to use a different HttpClient implementation 2023-05-31 10:17:21 +02:00
Dirkjan Ochtman 560ae75535 Use trait object for HTTP client implementation 2023-05-31 10:17:21 +02:00
picoHz b4ca9c11be Add support for EAB in newAccount requests 2023-05-18 17:20:53 +02:00
Dirkjan Ochtman c4f715216f Move JoseJson creation logic into new() method 2023-05-18 17:20:53 +02:00
Dirkjan Ochtman c4a1c29534 Move Signer trait into types module 2023-05-18 17:20:53 +02:00
Dirkjan Ochtman 92864b03bf Move JSON signing logic from Key to Signer 2023-05-18 17:20:53 +02:00
Dirkjan Ochtman 48cd0a0ded Defer serialization of JoseJson data 2023-05-18 17:20:53 +02:00
Dirkjan Ochtman 963ca96aa2 Move signing implementation into Signer trait 2023-05-18 17:20:53 +02:00
Dirkjan Ochtman df80c1621d Move JSON creation out of Signer trait 2023-05-18 17:20:53 +02:00