Skip to content

Commit 426903f

Browse files
committed
ACME: tls-alpn-01 challenge solver implementation.
1 parent fda230c commit 426903f

File tree

8 files changed

+537
-8
lines changed

8 files changed

+537
-8
lines changed

README.md

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,15 @@ certificate management (ACMEv2) protocol.
1111

1212
The module implements following specifications:
1313

14-
* [RFC8555] (Automatic Certificate Management Environment) with limitations:
15-
* Only HTTP-01 challenge type is supported
16-
* External account binding is not supported
14+
- [RFC8555] (Automatic Certificate Management Environment) with limitations:
15+
- Only HTTP-01 challenge type is supported
16+
- External account binding is not supported
17+
- [RFC8737] (ACME TLS Application-Layer Protocol Negotiation (ALPN) Challenge
18+
Extension)
1719

1820
[NGINX]: https://nginx.org/
1921
[RFC8555]: https://www.rfc-editor.org/rfc/rfc8555.html
22+
[RFC8737]: https://www.rfc-editor.org/rfc/rfc8737.html
2023

2124
## Getting Started
2225

@@ -166,6 +169,19 @@ Accepted values:
166169
The generated account keys are preserved across reloads, but will be lost on
167170
restart unless [state_path](#state_path) is configured.
168171

172+
### challenge
173+
174+
**Syntax:** challenge `type`
175+
176+
**Default:** http-01
177+
178+
**Context:** acme_issuer
179+
180+
Sets challenge type used for this issuer. Allowed values:
181+
182+
- `http-01`
183+
- `tls-alpn-01`
184+
169185
### contact
170186

171187
**Syntax:** contact `url`

src/acme.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ pub struct NewCertificateOutput {
4141

4242
pub struct AuthorizationContext<'a> {
4343
pub thumbprint: &'a [u8],
44+
pub pkey: &'a PKeyRef<Private>,
4445
}
4546

4647
pub struct AcmeClient<'a, Http>
@@ -332,6 +333,7 @@ where
332333

333334
let order = AuthorizationContext {
334335
thumbprint: self.key.thumbprint(),
336+
pkey: &pkey,
335337
};
336338

337339
for (url, authorization) in authorizations {

src/acme/solvers.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ use super::AuthorizationContext;
1010
use crate::conf::identifier::Identifier;
1111

1212
pub mod http;
13+
pub mod tls_alpn;
1314

1415
#[derive(Debug, Error)]
1516
#[error("challenge registration failed: {0}")]

0 commit comments

Comments
 (0)