Commit Graph

60 Commits

Author SHA1 Message Date
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
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
dvdsk c9a7b9da52 cargo fmt 2023-04-23 20:16:42 +02:00
dvdsk 9f9c6e48fe add comment to prevent regressing PR #17 2023-04-23 20:16:42 +02:00
David Kleingeld 3257747d6b emit Problem::check error even if no url found
Lets encrypt can return a clear error when creating a new order without returning an `order_url`. 

A missing `order_url` however triggers an early return with error message `no order URL found`. The error from lets encrypt is then never shown to the crate user.

Swapping the `state` and `url` field instantiation in `new_order`  is enough to let `Problem::check` emit the lets encrypt error.

### Example case
Requesting a certificate for *example.org*:
Original output:
```
missing data: no order URL found
```

New:
```
API error: Error creating new order :: Cannot issue for "example.org": The ACME server refuses to issue a certificate for this domain name, because it is forbidden by policy (urn:ietf:params:acme:error:rejectedIdentifier)
```
2023-04-23 16:07:10 +02:00
David Kleingeld 1a9ce194b7 Annotate Api::Problem error with thiserror::transparent
Error variant `Api::Problem` prints "API error: {problem}" however the Problem struct has display impl that starts by printing "API error". Together this results in "API error: API error" followed by the details.

This fixes that by annotating `Api::Problem` with `thiserror`'s `transparent` attribute which forwards the display impl to the underlying types display impl.
2023-04-23 15:18:14 +02:00
Dirkjan Ochtman 0cc77ff2ca Postpone certificate retrieval until order is valid 2023-03-15 19:01:15 +01:00
Dirkjan Ochtman a2d4129201 Maintain OrderState within Order type 2023-03-15 19:01:15 +01:00
Dirkjan Ochtman 77e435ca01 Apply clippy suggestions for 1.67 2023-01-30 14:17:37 +01:00
Dirkjan Ochtman a438e48f02 Bump base64 dependency to 0.21 2023-01-09 12:57:53 +01:00
Dirkjan Ochtman 60ed0983a7 Rename to_bytes() to digest() 2022-11-15 10:11:13 +01:00
Dirkjan Ochtman 8c0a179cc9 Document challenge types in specific methods 2022-11-15 10:10:52 +01:00
Dirkjan Ochtman b87f572719 Create constructor for KeyAuthorization 2022-11-15 10:03:10 +01:00
Dirkjan Ochtman f34971b3e8 Move KeyAuthorization into crate root 2022-11-15 10:00:57 +01:00
Sajjad Pourali 1f42c1e5a2 Allow direct access to SHA-256 digest of KeyAuthorization
This is used directly for the TLS-ALPN-01 challenge type.
2022-11-15 09:54:12 +01:00
Dirkjan Ochtman 37223c1a62 Apply clippy suggestions 2022-08-12 18:38:08 +02:00
Dirkjan Ochtman b7dd9c4dc0 Add API documentation 2022-05-12 21:47:01 +02:00
Dirkjan Ochtman 1cf7c81f6b Make LetsEncrypt::url() const 2022-05-12 21:47:01 +02:00
Dirkjan Ochtman 82daaac525 acme: simplify account serialization handling 2022-05-12 10:00:26 +02:00
Dirkjan Ochtman 8082166924 acme: reduce unnecessary cloning 2022-05-12 10:00:26 +02:00
Dirkjan Ochtman 5be34c546c acme: inline nonce handling 2022-05-12 10:00:26 +02:00
Dirkjan Ochtman 40a561ffb5 acme: switch from reqwest to hyper 2022-05-12 10:00:26 +02:00
Dirkjan Ochtman 3e64360c59 acme: move Problem extraction into associated function 2022-05-12 10:00:26 +02:00