Skip to content

Commit 8d7d485

Browse files
committed
Update ngx-rust to git rev a65d166.
1 parent 8cc7385 commit 8d7d485

File tree

4 files changed

+9
-13
lines changed

4 files changed

+9
-13
lines changed

Cargo.lock

Lines changed: 2 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,7 @@ export-modules = []
4444
[profile.release]
4545
codegen-units = 1
4646
lto = true
47+
48+
[patch.crates-io]
49+
ngx = { git = "https://github.com/nginx/ngx-rust.git", rev = "a65d166b89c59a252299ec168ca8d3d7030a46b2" }
50+
nginx-sys = { git = "https://github.com/nginx/ngx-rust.git", rev = "a65d166b89c59a252299ec168ca8d3d7030a46b2" }

src/acme/solvers/tls_alpn.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use nginx_sys::{ngx_conf_t, ngx_http_validate_host, ngx_str_t, NGX_LOG_ERR};
1010
use ngx::allocator::Allocator;
1111
use ngx::collections::RbTreeMap;
1212
use ngx::core::{NgxString, SlabPool, Status};
13-
use ngx::http::{HttpModule, HttpModuleServerConf};
13+
use ngx::http::{HttpModuleMainConf, HttpModuleServerConf};
1414
use ngx::sync::RwLock;
1515
use ngx::{ngx_log_debug, ngx_log_error};
1616
use openssl::asn1::Asn1Time;
@@ -295,12 +295,7 @@ fn acme_register_client_hello_cb(ssl_ctx: &mut SSL_CTX) {
295295
unsafe fn get_acme_main_conf(c: &nginx_sys::ngx_connection_t) -> Option<&AcmeMainConfig> {
296296
unsafe {
297297
let hc = c.data.cast::<nginx_sys::ngx_http_connection_t>().as_ref()?;
298-
let conf_ctx = hc.conf_ctx.as_ref()?;
299-
(*conf_ctx
300-
.main_conf
301-
.add(crate::HttpAcmeModule::module().ctx_index))
302-
.cast::<AcmeMainConfig>()
303-
.as_ref()
298+
crate::HttpAcmeModule::main_conf(hc)
304299
}
305300
}
306301

src/conf.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,6 @@ extern "C" fn cmd_issuer_set_external_account_key(
452452
return NGX_CONF_DUPLICATE;
453453
}
454454

455-
let mut pool = cf.pool();
456455
// NGX_CONF_TAKE2 ensures that args contains 3 elements
457456
let args = cf.args();
458457

@@ -479,7 +478,7 @@ extern "C" fn cmd_issuer_set_external_account_key(
479478

480479
let len = encoded.len.div_ceil(4) * 3;
481480
let mut key = ngx_str_t {
482-
data: pool.alloc_unaligned(len).cast(),
481+
data: cf.pool().alloc_unaligned(len).cast(),
483482
len,
484483
};
485484

0 commit comments

Comments
 (0)