Skip to content

duesee/acme-types

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Note

This is a hard fork of https://crates.io/crates/acme-types with minor fixes and improvements. We forked the project because the original repository appears to be unavailable, and I was unable to contact the author. The first commit reflects the original source. If you are the maintainer, please say so :-)

This crate defines types for implementing ACME (RFC 8555) providers and clients.

  • This crate does not include any HTTP library or provide any functionality (beyond support for de/serialization, as documented below) for interacting with an ACME client or provider, e.g. a server or client
  • This crate does not provide any of the cryptographic functions necessary for implementing an ACME provider or client
use acme_types::v2 as ACME;

let resp = reqwest::get("https://acme-v02.api.letsencrypt.org/directory")
    .await?
    .text()
    .await?;

let directory = ACME::Directory::from_str(&resp).unwrap();

println!("{:#?}", directory);

>>> Directory {
>>>     new_nonce: "https://acme-v02.api.letsencrypt.org/acme/new-nonce",
>>>     new_account: "https://acme-v02.api.letsencrypt.org/acme/new-acct",
>>>     new_order: "https://acme-v02.api.letsencrypt.org/acme/new-order",
>>>     new_authorization: None,
>>>     revoke_certificate: "https://acme-v02.api.letsencrypt.org/acme/revoke-cert",
>>>     key_change: "https://acme-v02.api.letsencrypt.org/acme/key-change",
>>>     metadata: Some(
>>>         DirectoryMetadata {
>>>             terms_of_service: Some(
>>>                 "https://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf",
>>>             ),
>>>             website: Some(
>>>                 "https://letsencrypt.org",
>>>             ),
>>>             caa_identities: Some(
>>>                 [
>>>                     "letsencrypt.org",
>>>                 ],
>>>             ),
>>>             external_account_required: None,
>>>         },
>>>     ),
>>> }

Crate Features

JSON De/serialization (json)

Serialization and deserialization to and from JSON is supported using the serde (and serde_json) crate(s). This integration is optional (feature json):

acme-types = { version = "*", features = ["json"] }

When this feature is enabled, from_str and to_string are implemented on top-level ACME objects and resources.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages