Skip to content

Instantly share code, notes, and snippets.

@xeioex
Created September 29, 2025 05:29
Show Gist options
  • Save xeioex/6c399a439bf333c311318f918e03d08d to your computer and use it in GitHub Desktop.
Save xeioex/6c399a439bf333c311318f918e03d08d to your computer and use it in GitHub Desktop.
diff --git a/src/acme/solvers/tls_alpn.rs b/src/acme/solvers/tls_alpn.rs
index 4143f83..f7fa6ae 100644
--- a/src/acme/solvers/tls_alpn.rs
+++ b/src/acme/solvers/tls_alpn.rs
@@ -537,7 +537,7 @@ fn acme_parse_ssl_server_name(
let mut addr: u128 = 0;
let mut it = v6.as_bytes().split(|x| *x == b'.');
- for i in (0..128).step_by(4) {
+ for i in 0..32 {
let x = it.next().ok_or(ParseIdentifierError::InvalidV6Ptr)?;
if x.len() != 1 {
@@ -551,7 +551,7 @@ fn acme_parse_ssl_server_name(
};
// Max value is 0x0f << 124, does not overflow
- addr += (x as u128) << i;
+ addr += (x as u128) << (i * 4);
}
if it.next().is_some() {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment