File tree Expand file tree Collapse file tree 10 files changed +860
-7
lines changed Expand file tree Collapse file tree 10 files changed +860
-7
lines changed Original file line number Diff line number Diff line change @@ -11,11 +11,14 @@ certificate management (ACMEv2) protocol.
11
11
12
12
The module implements following specifications:
13
13
14
- * [ RFC8555] (Automatic Certificate Management Environment) with limitations:
15
- * Only HTTP-01 challenge type is supported
14
+ - [ RFC8555] (Automatic Certificate Management Environment) with limitations:
15
+ - Only HTTP-01 challenge type is supported
16
+ - [ RFC8737] (ACME TLS Application-Layer Protocol Negotiation (ALPN) Challenge
17
+ Extension)
16
18
17
19
[ NGINX ] : https://nginx.org/
18
20
[ RFC8555 ] : https://www.rfc-editor.org/rfc/rfc8555.html
21
+ [ RFC8737 ] : https://www.rfc-editor.org/rfc/rfc8737.html
19
22
20
23
## Getting Started
21
24
@@ -188,6 +191,19 @@ Accepted values:
188
191
The generated account keys are preserved across reloads, but will be lost on
189
192
restart unless [ state_path] ( #state_path ) is configured.
190
193
194
+ ### challenge
195
+
196
+ ** Syntax:** challenge ` type `
197
+
198
+ ** Default:** http-01
199
+
200
+ ** Context:** acme_issuer
201
+
202
+ Sets challenge type used for this issuer. Allowed values:
203
+
204
+ - ` http-01 `
205
+ - ` tls-alpn-01 `
206
+
191
207
### contact
192
208
193
209
** Syntax:** contact ` url `
Original file line number Diff line number Diff line change @@ -54,13 +54,18 @@ fn detect_nginx_features() {
54
54
// Generate cfg values for version checks
55
55
56
56
println ! ( "cargo::rustc-check-cfg=cfg(ngx_ssl_cache)" ) ;
57
+ println ! ( "cargo::rustc-check-cfg=cfg(ngx_ssl_client_hello_cb)" ) ;
57
58
println ! ( "cargo::rerun-if-env-changed=DEP_NGINX_VERSION_NUMBER" ) ;
58
59
if let Ok ( version) = env:: var ( "DEP_NGINX_VERSION_NUMBER" ) {
59
60
let version: u64 = version. parse ( ) . unwrap ( ) ;
60
61
61
62
if version >= 1_027_002 {
62
63
println ! ( "cargo::rustc-cfg=ngx_ssl_cache" ) ;
63
64
}
65
+
66
+ if version >= 1_029_002 {
67
+ println ! ( "cargo::rustc-cfg=ngx_ssl_client_hello_cb" ) ;
68
+ }
64
69
}
65
70
}
66
71
Original file line number Diff line number Diff line change @@ -41,7 +41,13 @@ pub struct NewCertificateOutput {
41
41
}
42
42
43
43
pub struct AuthorizationContext < ' a > {
44
+ /// Account key thumbprint.
44
45
pub thumbprint : & ' a [ u8 ] ,
46
+ /// A private key generated for the new certificate request.
47
+ ///
48
+ /// This is used in tls-alpn-01 challenge to avoid generating a new key on each verification
49
+ /// attempt.
50
+ pub pkey : & ' a PKeyRef < Private > ,
45
51
}
46
52
47
53
pub struct AcmeClient < ' a , Http >
@@ -357,6 +363,7 @@ where
357
363
358
364
let order = AuthorizationContext {
359
365
thumbprint : self . key . thumbprint ( ) ,
366
+ pkey : & pkey,
360
367
} ;
361
368
362
369
for ( url, authorization) in authorizations {
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ use super::AuthorizationContext;
10
10
use crate :: conf:: identifier:: Identifier ;
11
11
12
12
pub mod http;
13
+ pub mod tls_alpn;
13
14
14
15
#[ derive( Debug , Error ) ]
15
16
#[ error( "challenge registration failed: {0}" ) ]
You can’t perform that action at this time.
0 commit comments