-
-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
63ee953
commit 887e6b6
Showing
13 changed files
with
173 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
[package] | ||
name = "rpxy-acme" | ||
description = "ACME manager library for `rpxy`" | ||
version.workspace = true | ||
authors.workspace = true | ||
homepage.workspace = true | ||
repository.workspace = true | ||
license.workspace = true | ||
readme.workspace = true | ||
edition.workspace = true | ||
publish.workspace = true | ||
|
||
[dependencies] | ||
url = { version = "2.5.2" } | ||
rustc-hash = "2.0.0" | ||
thiserror = "1.0.62" | ||
tracing = "0.1.40" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/// ACME directory url | ||
pub const ACME_DIR_URL: &str = "https://acme-v02.api.letsencrypt.org/directory"; | ||
|
||
/// ACME registry path that stores account key and certificate | ||
pub const ACME_REGISTRY_PATH: &str = "./acme_registry"; | ||
|
||
/// ACME accounts directory, subdirectory of ACME_REGISTRY_PATH | ||
pub(crate) const ACME_ACCOUNT_SUBDIR: &str = "account"; | ||
|
||
/// ACME private key file name | ||
pub const ACME_PRIVATE_KEY_FILE_NAME: &str = "private_key.pem"; | ||
|
||
/// ACME certificate file name | ||
pub const ACME_CERTIFICATE_FILE_NAME: &str = "certificate.pem"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
use thiserror::Error; | ||
|
||
#[derive(Error, Debug)] | ||
/// Error type for rpxy-acme | ||
pub enum RpxyAcmeError { | ||
/// Invalid acme registry path | ||
#[error("Invalid acme registry path")] | ||
InvalidAcmeRegistryPath, | ||
/// Invalid url | ||
#[error("Invalid url: {0}")] | ||
InvalidUrl(#[from] url::ParseError), | ||
/// IO error | ||
#[error("IO error: {0}")] | ||
Io(#[from] std::io::Error), | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
mod constants; | ||
mod error; | ||
mod targets; | ||
|
||
#[allow(unused_imports)] | ||
mod log { | ||
pub(super) use tracing::{debug, error, info, warn}; | ||
} | ||
|
||
pub use constants::{ACME_CERTIFICATE_FILE_NAME, ACME_DIR_URL, ACME_PRIVATE_KEY_FILE_NAME, ACME_REGISTRY_PATH}; | ||
pub use error::RpxyAcmeError; | ||
pub use targets::AcmeTargets; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters