Yet Another ACME Client
This crate provides the unified interface to using YACME sub-crates.
To get started, check out yacme::service
, which provides
a high level, strongly typed interface to an ACME client.
An example is available in letsencrypt-pebble.rs
Using the high level service interface, you can connect to letsencrypt (or really, and ACME provider) and issue a certificate:
(check out letsencrypt-pebble.rs
for more details on this example)
```rust let provider = yacme::service::Provider::build(). directory_url("https://acme-v02.api.letsencrypt.org/directory") .build() .await?;
let accountkey = Arc::new(SignatureKind::Ecdsa(yacmekey::EcdsaAlgorithm::P256).random()); // Fetch an existing account let account = provider.account().key(accountkey).mustexist().get().await?;
// Create a new order let mut order = account .order() .dns("www.example.test") .dns("internal.example.test") .create() .await?;
// Get the authorizations
let authz: Vec
// Set a certifiacte key let certkey = Arc::new(SignatureKind::Ecdsa(yacmekey::EcdsaAlgorithm::P256).random());
// Attach the certificate key to the order order.certificate_key(key);
// Finalize and fetch the order let cert = order.finalizeanddonwload().await?;
```
MIT