From fbf30ae6717d70c7877ffabc2fead6506f01a87c Mon Sep 17 00:00:00 2001 From: phplego Date: Thu, 13 Aug 2026 13:55:49 +0700 Subject: [PATCH 1/5] Terminate Linux proxy watcher with parent --- Cargo.lock | 1 + Cargo.toml | 4 ++++ src/platform/linux.rs | 45 +++++++++++++++++++++++++++++++------------ 3 files changed, 38 insertions(+), 12 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a47c1f6..ad7774f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -733,6 +733,7 @@ version = "0.1.0" dependencies = [ "cc", "core-foundation", + "libc", "log", "psl", "rquickjs-sys", diff --git a/Cargo.toml b/Cargo.toml index 7f6f047..9ac559b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -64,6 +64,7 @@ log = "0.4" tokio = { version = "1", optional = true, default-features = false, features = ["sync"] } # Public Suffix List used to stop the WPAD suffix walk at the registrable domain. psl = "2" + # Runtime for the sandboxed PAC backend, in AOT mode only: `runtime` + `std` # but deliberately NO `cranelift` (or `winch`/`pulley`), so this build cannot # compile wasm at all — it can only `Module::deserialize` the artifact that @@ -116,6 +117,9 @@ windows-sys = { version = "0.60", features = [ # non-Windows dependency above. rquickjs-sys = { version = "0.12.1", optional = true } +[target.'cfg(target_os = "linux")'.dependencies] +libc = "0.2" + [dev-dependencies] tokio = { version = "1", features = ["sync", "rt", "macros", "time"] } diff --git a/src/platform/linux.rs b/src/platform/linux.rs index 7caac0c..7fe5f07 100644 --- a/src/platform/linux.rs +++ b/src/platform/linux.rs @@ -20,6 +20,7 @@ use crate::bypass::BypassRules; use crate::types::{LinuxProxyConfig, PlatformProxyConfig, ProxyKind}; use std::collections::HashMap; use std::io::BufRead; +use std::os::unix::process::CommandExt; use std::process::{Child, Command, Stdio}; use std::sync::{Arc, Mutex}; @@ -128,19 +129,15 @@ pub(crate) struct Watcher { } pub(crate) fn spawn_watcher(on_change: Arc) -> Watcher { - let mut spawned = Command::new("dconf") - .args(["watch", "/system/proxy/"]) - .stdin(Stdio::null()) - .stdout(Stdio::piped()) - .stderr(Stdio::null()) - .spawn(); + let mut dconf = Command::new("dconf"); + dconf.args(["watch", "/system/proxy/"]); + configure_watcher_command(&mut dconf); + let mut spawned = dconf.spawn(); if spawned.is_err() { - spawned = Command::new("gsettings") - .args(["monitor", "org.gnome.system.proxy"]) - .stdin(Stdio::null()) - .stdout(Stdio::piped()) - .stderr(Stdio::null()) - .spawn(); + let mut gsettings = Command::new("gsettings"); + gsettings.args(["monitor", "org.gnome.system.proxy"]); + configure_watcher_command(&mut gsettings); + spawned = gsettings.spawn(); } let Ok(mut child) = spawned else { log::debug!( @@ -173,6 +170,30 @@ pub(crate) fn spawn_watcher(on_change: Arc) -> Watcher { Watcher { child, thread } } +/// Configure a proxy watcher to terminate if its owning process exits without dropping it. +fn configure_watcher_command(command: &mut Command) { + let expected_parent = std::process::id() as libc::pid_t; + command + .stdin(Stdio::null()) + .stdout(Stdio::piped()) + .stderr(Stdio::null()); + + // SAFETY: pre_exec runs after fork in the single-threaded child. prctl and + // getppid are async-signal-safe Linux system calls and do not access Rust state. + unsafe { + command.pre_exec(move || { + if libc::prctl(libc::PR_SET_PDEATHSIG, libc::SIGTERM) == -1 { + return Err(std::io::Error::last_os_error()); + } + // The parent may have exited between fork and PR_SET_PDEATHSIG. + if libc::getppid() != expected_parent { + libc::raise(libc::SIGTERM); + } + Ok(()) + }); + } +} + impl Drop for Watcher { fn drop(&mut self) { if let Some(mut child) = self.child.lock().unwrap_or_else(|e| e.into_inner()).take() { From 129b91be56cc53bcb4d77f16793b606f4506c3db Mon Sep 17 00:00:00 2001 From: Christof Marti Date: Fri, 21 Aug 2026 13:47:25 +0000 Subject: [PATCH 2/5] Harden Linux proxy watcher lifetime Spawn the watcher from its dedicated reader thread so Linux parent-death signaling follows the watcher's lifetime rather than an arbitrary caller thread. Add regression coverage for abrupt parent exit and short-lived caller threads, and direct support requests to microsoft/vscode. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- SUPPORT.md | 12 ++- src/platform/linux.rs | 235 +++++++++++++++++++++++++++++++++++------- src/platform/mod.rs | 2 +- 3 files changed, 205 insertions(+), 44 deletions(-) diff --git a/SUPPORT.md b/SUPPORT.md index f045780..a1d787e 100644 --- a/SUPPORT.md +++ b/SUPPORT.md @@ -2,12 +2,14 @@ ## How to file issues and get help -This project uses GitHub Issues to track bugs and feature requests. Please -search the [existing issues](https://github.com/microsoft/os-proxy-resolver/issues) -before filing new issues to avoid duplicates. For new issues, file your bug or -feature request as a new Issue. +This repository does not have GitHub Issues enabled. Please search the +[existing Visual Studio Code issues](https://github.com/microsoft/vscode/issues) +before filing bugs or feature requests to avoid duplicates. File new reports in +the [microsoft/vscode repository](https://github.com/microsoft/vscode/issues/new/choose) +and mention `os-proxy-resolver` in the report. -For help and questions about using this project, please file a GitHub Issue. +For help and questions about using this project, please file an issue in the +`microsoft/vscode` repository. ## Microsoft Support Policy diff --git a/src/platform/linux.rs b/src/platform/linux.rs index 7fe5f07..e8f5a72 100644 --- a/src/platform/linux.rs +++ b/src/platform/linux.rs @@ -22,7 +22,7 @@ use std::collections::HashMap; use std::io::BufRead; use std::os::unix::process::CommandExt; use std::process::{Child, Command, Stdio}; -use std::sync::{Arc, Mutex}; +use std::sync::{mpsc, Arc, Mutex}; pub(crate) fn read_config() -> OsProxyConfig { let output = Command::new("gsettings") @@ -129,45 +129,77 @@ pub(crate) struct Watcher { } pub(crate) fn spawn_watcher(on_change: Arc) -> Watcher { + spawn_watcher_thread(spawn_system_watcher, on_change) +} + +fn spawn_system_watcher() -> Option { let mut dconf = Command::new("dconf"); dconf.args(["watch", "/system/proxy/"]); configure_watcher_command(&mut dconf); - let mut spawned = dconf.spawn(); - if spawned.is_err() { - let mut gsettings = Command::new("gsettings"); - gsettings.args(["monitor", "org.gnome.system.proxy"]); - configure_watcher_command(&mut gsettings); - spawned = gsettings.spawn(); - } - let Ok(mut child) = spawned else { - log::debug!( - "proxy watcher: neither dconf nor gsettings available; changes will not be detected" - ); - return Watcher { - child: Arc::new(Mutex::new(None)), - thread: None, - }; + let dconf_error = match dconf.spawn() { + Ok(child) => return Some(child), + Err(error) => error, }; - let stdout = child.stdout.take(); - let child = Arc::new(Mutex::new(Some(child))); - let thread = stdout.map(|stdout| { - std::thread::Builder::new() - .name("os-proxy-watch".into()) - .spawn(move || { - let reader = std::io::BufReader::new(stdout); - for line in reader.lines() { - let Ok(line) = line else { break }; - // dconf watch prints the changed path on an unindented - // line, then the value indented; only count the former. - if !line.is_empty() && !line.starts_with(char::is_whitespace) { - on_change(); - } + let mut gsettings = Command::new("gsettings"); + gsettings.args(["monitor", "org.gnome.system.proxy"]); + configure_watcher_command(&mut gsettings); + match gsettings.spawn() { + Ok(child) => Some(child), + Err(gsettings_error) => { + log::debug!( + "proxy watcher: failed to spawn dconf ({dconf_error}) and gsettings \ + ({gsettings_error}); changes will not be detected" + ); + None + } + } +} + +fn spawn_watcher_thread( + spawn_child: impl FnOnce() -> Option + Send + 'static, + on_change: Arc, +) -> Watcher { + let child = Arc::new(Mutex::new(None)); + let thread_child = child.clone(); + let (started_tx, started_rx) = mpsc::sync_channel(0); + let thread = std::thread::Builder::new() + .name("os-proxy-watch".into()) + .spawn(move || { + let Some(mut spawned_child) = spawn_child() else { + let _ = started_tx.send(()); + return; + }; + let Some(stdout) = spawned_child.stdout.take() else { + let _ = spawned_child.kill(); + let _ = spawned_child.wait(); + log::debug!("proxy watcher: child stdout was not piped"); + let _ = started_tx.send(()); + return; + }; + *thread_child + .lock() + .unwrap_or_else(|poisoned| poisoned.into_inner()) = Some(spawned_child); + let _ = started_tx.send(()); + + let reader = std::io::BufReader::new(stdout); + for line in reader.lines() { + let Ok(line) = line else { break }; + // dconf watch prints the changed path on an unindented + // line, then the value indented; only count the former. + if !line.is_empty() && !line.starts_with(char::is_whitespace) { + on_change(); } - }) - .expect("failed to spawn proxy watcher thread") - }); - Watcher { child, thread } + } + }) + .expect("failed to spawn proxy watcher thread"); + started_rx + .recv() + .expect("proxy watcher thread stopped during startup"); + Watcher { + child, + thread: Some(thread), + } } /// Configure a proxy watcher to terminate if its owning process exits without dropping it. @@ -178,16 +210,16 @@ fn configure_watcher_command(command: &mut Command) { .stdout(Stdio::piped()) .stderr(Stdio::null()); - // SAFETY: pre_exec runs after fork in the single-threaded child. prctl and - // getppid are async-signal-safe Linux system calls and do not access Rust state. + // SAFETY: pre_exec runs after fork in the single-threaded child. These + // operations only invoke async-signal-safe Linux system calls. unsafe { command.pre_exec(move || { - if libc::prctl(libc::PR_SET_PDEATHSIG, libc::SIGTERM) == -1 { + if libc::prctl(libc::PR_SET_PDEATHSIG, libc::SIGKILL) == -1 { return Err(std::io::Error::last_os_error()); } // The parent may have exited between fork and PR_SET_PDEATHSIG. if libc::getppid() != expected_parent { - libc::raise(libc::SIGTERM); + libc::_exit(1); } Ok(()) }); @@ -216,6 +248,133 @@ pub(crate) fn dns_search_domains() -> Vec { #[cfg(test)] mod tests { use super::*; + use std::path::Path; + use std::time::{Duration, Instant}; + + const WATCHER_SUBPROCESS_ENV: &str = "OS_PROXY_RESOLVER_WATCHER_SUBPROCESS"; + + fn spawn_test_watcher() -> Watcher { + spawn_watcher_thread( + || { + let mut command = Command::new("sleep"); + command.arg("60"); + configure_watcher_command(&mut command); + Some(command.spawn().expect("failed to spawn test watcher")) + }, + Arc::new(|| {}), + ) + } + + fn watcher_child_pid(watcher: &Watcher) -> u32 { + watcher + .child + .lock() + .unwrap_or_else(|poisoned| poisoned.into_inner()) + .as_ref() + .expect("test watcher child was not started") + .id() + } + + fn process_is_running(pid: u32) -> bool { + let stat = match std::fs::read_to_string(format!("/proc/{pid}/stat")) { + Ok(stat) => stat, + Err(error) if error.kind() == std::io::ErrorKind::NotFound => return false, + Err(error) => panic!("failed to read status for process {pid}: {error}"), + }; + stat.rsplit_once(") ") + .and_then(|(_, fields)| fields.chars().next()) + .is_some_and(|state| state != 'Z') + } + + fn wait_for_process_exit(pid: u32) -> bool { + let deadline = Instant::now() + Duration::from_secs(5); + while process_is_running(pid) { + if Instant::now() >= deadline { + return false; + } + std::thread::sleep(Duration::from_millis(10)); + } + true + } + + struct ProcessGuard(Option); + + impl Drop for ProcessGuard { + fn drop(&mut self) { + let Some(pid) = self.0 else { + return; + }; + // SAFETY: kill with a positive PID and SIGKILL has no memory-safety + // requirements. It is only a fallback for a failed test. + unsafe { + libc::kill(pid as libc::pid_t, libc::SIGKILL); + } + } + } + + #[test] + fn watcher_outlives_the_thread_that_created_it() { + let (watcher, pid) = std::thread::spawn(|| { + let watcher = spawn_test_watcher(); + let pid = watcher_child_pid(&watcher); + (watcher, pid) + }) + .join() + .expect("watcher creator thread panicked"); + + assert!( + process_is_running(pid), + "watcher exited with its short-lived caller thread" + ); + drop(watcher); + assert!( + wait_for_process_exit(pid), + "watcher did not exit when dropped" + ); + } + + #[test] + fn watcher_exits_when_parent_process_exits_without_drop() { + let pid_file = std::env::temp_dir().join(format!( + "os-proxy-resolver-watcher-{}.pid", + std::process::id() + )); + let _ = std::fs::remove_file(&pid_file); + let status = Command::new(std::env::current_exe().expect("test executable unavailable")) + .arg("watcher_parent_death_subprocess_helper") + .arg("--nocapture") + .env(WATCHER_SUBPROCESS_ENV, &pid_file) + .status() + .expect("failed to run watcher parent subprocess"); + let pid_result = std::fs::read_to_string(&pid_file); + let _ = std::fs::remove_file(&pid_file); + + assert!(status.success(), "watcher parent subprocess failed"); + let pid = pid_result + .expect("watcher parent subprocess did not report its child PID") + .parse() + .expect("watcher parent subprocess reported an invalid child PID"); + let mut guard = ProcessGuard(Some(pid)); + let exited = wait_for_process_exit(pid); + if exited { + guard.0 = None; + } + assert!(exited, "watcher survived after its parent process exited"); + } + + #[test] + fn watcher_parent_death_subprocess_helper() { + let Some(pid_file) = std::env::var_os(WATCHER_SUBPROCESS_ENV) else { + return; + }; + let watcher = spawn_test_watcher(); + std::fs::write( + Path::new(&pid_file), + watcher_child_pid(&watcher).to_string(), + ) + .expect("failed to report watcher PID"); + std::process::exit(0); + } #[test] fn parses_manual_mode() { diff --git a/src/platform/mod.rs b/src/platform/mod.rs index 1ce61b8..70acabb 100644 --- a/src/platform/mod.rs +++ b/src/platform/mod.rs @@ -19,7 +19,7 @@ use crate::types::{PlatformProxyConfig, ProxyKind}; #[cfg(target_os = "macos")] #[path = "macos.rs"] mod imp; -#[cfg(all(unix, not(target_os = "macos")))] +#[cfg(target_os = "linux")] #[path = "linux.rs"] mod imp; #[cfg(windows)] From 400814fb144276ae7d9d955be351f48ef48c6133 Mon Sep 17 00:00:00 2001 From: Christof Marti Date: Fri, 21 Aug 2026 14:27:26 +0000 Subject: [PATCH 3/5] Fix cross-target watcher test and metadata Run the self-reexec parent-death regression only where the test binary is host-compatible, while retaining architecture-independent watcher coverage. Refresh the addon lockfile and generated third-party notices for the direct libc dependency. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- ThirdPartyNotices.txt | 1114 ++++++++++++++++++++++++++++++++----- npm/ThirdPartyNotices.txt | 848 +++++++++++++++++++++++++++- npm/native/Cargo.lock | 1 + src/platform/linux.rs | 9 + 4 files changed, 1833 insertions(+), 139 deletions(-) diff --git a/ThirdPartyNotices.txt b/ThirdPartyNotices.txt index 33ed4ca..a7482ad 100644 --- a/ThirdPartyNotices.txt +++ b/ThirdPartyNotices.txt @@ -53,10 +53,10 @@ do not edit it by hand — update the crate graph or about.toml and regenerate instead. Overview of licenses used: -- MIT License (107 crates) -- Apache License 2.0 (26 crates) +- MIT License (109 crates) +- Apache License 2.0 (27 crates) - Unicode License v3 (19 crates) -- ISC License (3 crates) +- ISC License (18 crates) - Community Data License Agreement Permissive 2.0 (2 crates) - BSD 3-Clause "New" or "Revised" License (1 crate) - zlib License (1 crate) @@ -302,6 +302,286 @@ the License, but only in their entirety and only with respect to the Combined Software. +-------------------------------------------------------------------------------- + +Apache License 2.0 + +Used by: + - ring 0.17.14 + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + +Licenses for support code +------------------------- + +Parts of the TLS test suite are under the Go license. This code is not included +in BoringSSL (i.e. libcrypto and libssl) when compiled, however, so +distributing code linked against BoringSSL does not trigger this license: + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +BoringSSL uses the Chromium test infrastructure to run a continuous build, +trybots etc. The scripts which manage this, and the script for generating build +metadata, are under the Chromium license. Distributing code linked against +BoringSSL does not trigger this license. + +Copyright 2015 The Chromium Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + -------------------------------------------------------------------------------- Apache License 2.0 @@ -590,145 +870,644 @@ To apply the Apache License to your work, attach the following boilerplate notic Copyright [yyyy] [name of copyright owner] -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +-------------------------------------------------------------------------------- + +BSD 3-Clause "New" or "Revised" License + +Used by: + - subtle 2.6.1 + +Copyright (c) 2016-2017 Isis Agora Lovecruft, Henry de Valence. All rights reserved. +Copyright (c) 2016-2024 Isis Agora Lovecruft. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +1. Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS +IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +-------------------------------------------------------------------------------- + +Community Data License Agreement Permissive 2.0 + +Used by: + - webpki-roots 0.26.11 + - webpki-roots 1.0.8 + +# Community Data License Agreement - Permissive - Version 2.0 + +This is the Community Data License Agreement - Permissive, Version +2.0 (the "agreement"). Data Provider(s) and Data Recipient(s) agree +as follows: + +## 1. Provision of the Data + +1.1. A Data Recipient may use, modify, and share the Data made +available by Data Provider(s) under this agreement if that Data +Recipient follows the terms of this agreement. + +1.2. This agreement does not impose any restriction on a Data +Recipient's use, modification, or sharing of any portions of the +Data that are in the public domain or that may be used, modified, +or shared under any other legal exception or limitation. + +## 2. Conditions for Sharing Data + +2.1. A Data Recipient may share Data, with or without modifications, so +long as the Data Recipient makes available the text of this agreement +with the shared Data. + +## 3. No Restrictions on Results + +3.1. This agreement does not impose any restriction or obligations +with respect to the use, modification, or sharing of Results. + +## 4. No Warranty; Limitation of Liability + +4.1. All Data Recipients receive the Data subject to the following +terms: + +THE DATA IS PROVIDED ON AN "AS IS" BASIS, WITHOUT REPRESENTATIONS, +WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED +INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, +NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. + +NO DATA PROVIDER SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING +WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE DATA OR RESULTS, +EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +## 5. Definitions + +5.1. "Data" means the material received by a Data Recipient under +this agreement. + +5.2. "Data Provider" means any person who is the source of Data +provided under this agreement and in reliance on a Data Recipient's +agreement to its terms. + +5.3. "Data Recipient" means any person who receives Data directly +or indirectly from a Data Provider and agrees to the terms of this +agreement. + +5.4. "Results" means any outcome obtained by computational analysis +of Data, including for example machine learning models and models' +insights. + +-------------------------------------------------------------------------------- + +ISC License + +Used by: + - ring 0.17.14 + +/* Copyright (c) 2014, Intel Corporation. + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION + * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN + * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ + +#ifndef OPENSSL_HEADER_EC_ECP_NISTZ384_H +#define OPENSSL_HEADER_EC_ECP_NISTZ384_H + +#include "../../limbs/limbs.h" + +#define P384_LIMBS (384u / LIMB_BITS) + +typedef struct { + Limb X[P384_LIMBS]; + Limb Y[P384_LIMBS]; + Limb Z[P384_LIMBS]; +} P384_POINT; + +typedef struct { + Limb X[P384_LIMBS]; + Limb Y[P384_LIMBS]; +} P384_POINT_AFFINE; + + +#endif // OPENSSL_HEADER_EC_ECP_NISTZ384_H + +-------------------------------------------------------------------------------- + +ISC License + +Used by: + - ring 0.17.14 + +// Copyright 2015-2016 Brian Smith. +// +// Permission to use, copy, modify, and/or distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY +// SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION +// OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN +// CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +//! EdDSA Signatures. + +use super::ops::ELEM_LEN; +use crate::digest; + +pub mod signing; +pub mod verification; + +/// The length of an Ed25519 public key. +pub const ED25519_PUBLIC_KEY_LEN: usize = ELEM_LEN; + +pub fn eddsa_digest(signature_r: &[u8], public_key: &[u8], msg: &[u8]) -> digest::Digest { + let mut ctx = digest::Context::new(&digest::SHA512); + ctx.update(signature_r); + ctx.update(public_key); + ctx.update(msg); + ctx.finish() +} + +-------------------------------------------------------------------------------- + +ISC License + +Used by: + - untrusted 0.9.0 + +// Copyright 2015-2016 Brian Smith. +// +// Permission to use, copy, modify, and/or distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHORS DISCLAIM ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +-------------------------------------------------------------------------------- + +ISC License + +Used by: + - ring 0.17.14 + +// Copyright 2015-2022 Brian Smith. +// +// Permission to use, copy, modify, and/or distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY +// SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION +// OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN +// CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +use crate::limb::Limb; + +#[derive(Clone, Copy)] +#[repr(transparent)] +pub struct N0([Limb; 2]); + +impl N0 { + #[cfg(feature = "alloc")] + pub(super) const LIMBS_USED: usize = 64 / crate::limb::LIMB_BITS; + + #[inline] + pub const fn precalculated(n0: u64) -> Self { + #[cfg(target_pointer_width = "64")] + { + Self([n0, 0]) + } + + #[cfg(target_pointer_width = "32")] + { + Self([n0 as Limb, (n0 >> crate::limb::LIMB_BITS) as Limb]) + } + } +} + +-------------------------------------------------------------------------------- + +ISC License + +Used by: + - ring 0.17.14 + +// Copyright 2015-2025 Brian Smith. +// +// Permission to use, copy, modify, and/or distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY +// SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION +// OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN +// CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +use crate::{bb, error}; + +#[deprecated( + note = "To be removed. Internal function not intended for external use with no promises regarding side channels." +)] +pub fn verify_slices_are_equal(a: &[u8], b: &[u8]) -> Result<(), error::Unspecified> { + bb::verify_slices_are_equal(a, b) +} + +-------------------------------------------------------------------------------- + +ISC License + +Used by: + - ring 0.17.14 + +// Copyright 2016 Brian Smith. +// +// Permission to use, copy, modify, and/or distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY +// SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION +// OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN +// CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +//! Elliptic curve operations and schemes using Curve25519. + +pub mod ed25519; + +pub mod x25519; + +mod ops; +mod scalar; + +-------------------------------------------------------------------------------- + +ISC License + +Used by: + - ring 0.17.14 + +// Copyright 2016-2024 Brian Smith. +// +// Permission to use, copy, modify, and/or distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY +// SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION +// OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN +// CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +use crate::error::{KeyRejected, Unspecified}; + +impl From for Unspecified { + fn from(source: untrusted::EndOfInput) -> Self { + super::erase(source) + } +} + +impl From for Unspecified { + fn from(source: core::array::TryFromSliceError) -> Self { + super::erase(source) + } +} + +impl From for Unspecified { + fn from(source: KeyRejected) -> Self { + super::erase(source) + } +} + +-------------------------------------------------------------------------------- + +ISC License + +Used by: + - ring 0.17.14 + +// Copyright 2018 Brian Smith. +// +// Permission to use, copy, modify, and/or distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY +// SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION +// OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN +// CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +//! Serialization and deserialization. + +#[doc(hidden)] +pub mod der; + +#[cfg(feature = "alloc")] +mod writer; + +#[cfg(feature = "alloc")] +pub(crate) mod der_writer; + +pub(crate) mod positive; + +pub use self::positive::Positive; + +#[cfg(feature = "alloc")] +pub(crate) use self::writer::TooLongError; + +-------------------------------------------------------------------------------- + +ISC License + +Used by: + - ring 0.17.14 + +// Copyright 2019-2024 Brian Smith. +// +// Permission to use, copy, modify, and/or distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY +// SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION +// OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN +// CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +use super::BlockLen; + +pub(super) use self::{ + sha2_32::{block_data_order_32, State32, SHA256_BLOCK_LEN}, + sha2_64::{block_data_order_64, State64, SHA512_BLOCK_LEN}, +}; + +pub(super) const CHAINING_WORDS: usize = 8; -http://www.apache.org/licenses/LICENSE-2.0 +#[cfg(any( + all(target_arch = "aarch64", target_endian = "little"), + all(target_arch = "arm", target_endian = "little"), + target_arch = "x86_64" +))] +#[macro_use] +mod ffi; -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. +pub(super) mod fallback; +mod sha2_32; +mod sha2_64; -------------------------------------------------------------------------------- -BSD 3-Clause "New" or "Revised" License +ISC License Used by: - - subtle 2.6.1 + - ring 0.17.14 -Copyright (c) 2016-2017 Isis Agora Lovecruft, Henry de Valence. All rights reserved. -Copyright (c) 2016-2024 Isis Agora Lovecruft. All rights reserved. +// Copyright 2024 Brian Smith. +// +// Permission to use, copy, modify, and/or distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY +// SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION +// OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN +// CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: +// TODO(MSRV 1.76): Replace with `core::ptr::from_mut`. +#[allow(dead_code)] +#[inline(always)] +pub fn from_mut(r: &mut T) -> *mut T { + r +} -1. Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. +// TODO(MSRV 1.76): Replace with `core::ptr::from_ref`. +#[allow(dead_code)] +#[inline(always)] +pub const fn from_ref(r: &T) -> *const T { + r +} -2. Redistributions in binary form must reproduce the above copyright -notice, this list of conditions and the following disclaimer in the -documentation and/or other materials provided with the distribution. +-------------------------------------------------------------------------------- -3. Neither the name of the copyright holder nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. +ISC License -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS -IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +Used by: + - ring 0.17.14 + +// Copyright 2024 Brian Smith. +// +// Permission to use, copy, modify, and/or distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY +// SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION +// OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN +// CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +//! Integration tests for non-public APIs. + +mod bits_tests; -------------------------------------------------------------------------------- -Community Data License Agreement Permissive 2.0 +ISC License Used by: - - webpki-roots 0.26.11 - - webpki-roots 1.0.8 + - ring 0.17.14 -# Community Data License Agreement - Permissive - Version 2.0 +// Copyright 2024 Brian Smith. +// +// Permission to use, copy, modify, and/or distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY +// SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION +// OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN +// CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -This is the Community Data License Agreement - Permissive, Version -2.0 (the "agreement"). Data Provider(s) and Data Recipient(s) agree -as follows: +pub use self::{ + array::Array, + base::{IndexError, Overlapping}, + partial_block::PartialBlock, +}; -## 1. Provision of the Data +mod array; +mod base; +mod partial_block; -1.1. A Data Recipient may use, modify, and share the Data made -available by Data Provider(s) under this agreement if that Data -Recipient follows the terms of this agreement. +-------------------------------------------------------------------------------- -1.2. This agreement does not impose any restriction on a Data -Recipient's use, modification, or sharing of any portions of the -Data that are in the public domain or that may be used, modified, -or shared under any other legal exception or limitation. +ISC License -## 2. Conditions for Sharing Data +Used by: + - ring 0.17.14 -2.1. A Data Recipient may share Data, with or without modifications, so -long as the Data Recipient makes available the text of this agreement -with the shared Data. +// Copyright 2025 Brian Smith. +// +// Permission to use, copy, modify, and/or distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY +// SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION +// OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN +// CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -## 3. No Restrictions on Results +#![cfg(all(target_arch = "aarch64", target_endian = "little"))] -3.1. This agreement does not impose any restriction or obligations -with respect to the use, modification, or sharing of Results. +pub(in super::super) mod mont; -## 4. No Warranty; Limitation of Liability +-------------------------------------------------------------------------------- -4.1. All Data Recipients receive the Data subject to the following -terms: +ISC License -THE DATA IS PROVIDED ON AN "AS IS" BASIS, WITHOUT REPRESENTATIONS, -WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED -INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, -NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. +Used by: + - ring 0.17.14 -NO DATA PROVIDER SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING -WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE DATA OR RESULTS, -EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. +// Copyright 2025 Brian Smith. +// +// Permission to use, copy, modify, and/or distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY +// SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION +// OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN +// CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -## 5. Definitions +#![cfg(target_arch = "x86_64")] -5.1. "Data" means the material received by a Data Recipient under -this agreement. +pub(in super::super::super) mod mont; -5.2. "Data Provider" means any person who is the source of Data -provided under this agreement and in reliance on a Data Recipient's -agreement to its terms. +-------------------------------------------------------------------------------- -5.3. "Data Recipient" means any person who receives Data directly -or indirectly from a Data Provider and agrees to the terms of this -agreement. +ISC License -5.4. "Results" means any outcome obtained by computational analysis -of Data, including for example machine learning models and models' -insights. +Used by: + - ring 0.17.14 + +// Copyright 2025 Brian Smith. +// +// Permission to use, copy, modify, and/or distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY +// SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION +// OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN +// CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +mod storage; + +pub(super) use self::storage::{AlignedStorage, LIMBS_PER_CHUNK}; -------------------------------------------------------------------------------- ISC License Used by: - - untrusted 0.9.0 + - ring 0.17.14 -// Copyright 2015-2016 Brian Smith. +// Copyright 2025 Brian Smith. // // Permission to use, copy, modify, and/or distribute this software for any // purpose with or without fee is hereby granted, provided that the above // copyright notice and this permission notice appear in all copies. // -// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHORS DISCLAIM ALL WARRANTIES +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES // WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR -// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY +// SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION +// OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN +// CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +pub(super) mod aarch64; +pub(super) mod x86_64; -------------------------------------------------------------------------------- @@ -2226,6 +3005,39 @@ MIT License Copyright (c) [2021] [Marvin Countryman] +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +-------------------------------------------------------------------------------- + +MIT License + +Used by: + - miniz_oxide 0.8.9 + +MIT License + +Copyright 2013-2014 RAD Game Tools and Valve Software +Copyright 2010-2014 Rich Geldreich and Tenacious Software LLC +Copyright (c) 2017 Frommi +Copyright (c) 2017-2024 oyvindln + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights @@ -2365,29 +3177,29 @@ MIT License Used by: - allocator-api2 0.2.21 -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. +Permission is hereby granted, free of charge, to any +person obtaining a copy of this software and associated +documentation files (the "Software"), to deal in the +Software without restriction, including without +limitation the rights to use, copy, modify, merge, +publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software +is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice +shall be included in all copies or substantial portions +of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF +ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED +TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT +SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR +IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- @@ -2539,6 +3351,36 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. MIT License +Used by: + - ureq 2.12.1 + +The MIT License (MIT) + +Copyright (c) 2015 The tiny-http Contributors +Copyright (c) 2015 The rust-chunked-transfer Contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +-------------------------------------------------------------------------------- + +MIT License + Used by: - winapi-util 0.1.11 @@ -2630,26 +3472,26 @@ MIT License Used by: - generic-array 0.14.7 -The MIT License (MIT) - -Copyright (c) 2015 Bartłomiej Kamiński - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +The MIT License (MIT) + +Copyright (c) 2015 Bartłomiej Kamiński + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- diff --git a/npm/ThirdPartyNotices.txt b/npm/ThirdPartyNotices.txt index 00fb62c..7854950 100644 --- a/npm/ThirdPartyNotices.txt +++ b/npm/ThirdPartyNotices.txt @@ -25,17 +25,297 @@ The following third-party Rust crates are compiled into the native addon. This section is generated by `cargo about generate`; do not edit it by hand. Overview of licenses used: -- MIT License (74 crates) +- MIT License (76 crates) +- ISC License (19 crates) - Unicode License v3 (19 crates) -- ISC License (4 crates) +- Apache License 2.0 (2 crates) - Community Data License Agreement Permissive 2.0 (2 crates) -- Apache License 2.0 (1 crate) - BSD 3-Clause "New" or "Revised" License (1 crate) -------------------------------------------------------------------------------- Apache License 2.0 +Used by: + - ring 0.17.14 + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + +Licenses for support code +------------------------- + +Parts of the TLS test suite are under the Go license. This code is not included +in BoringSSL (i.e. libcrypto and libssl) when compiled, however, so +distributing code linked against BoringSSL does not trigger this license: + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +BoringSSL uses the Chromium test infrastructure to run a continuous build, +trybots etc. The scripts which manage this, and the script for generating build +metadata, are under the Chromium license. Distributing code linked against +BoringSSL does not trigger this license. + +Copyright 2015 The Chromium Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +-------------------------------------------------------------------------------- + +Apache License 2.0 + Used by: - ring 0.17.14 @@ -352,6 +632,88 @@ insights. ISC License +Used by: + - ring 0.17.14 + +/* Copyright (c) 2014, Intel Corporation. + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION + * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN + * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ + +#ifndef OPENSSL_HEADER_EC_ECP_NISTZ384_H +#define OPENSSL_HEADER_EC_ECP_NISTZ384_H + +#include "../../limbs/limbs.h" + +#define P384_LIMBS (384u / LIMB_BITS) + +typedef struct { + Limb X[P384_LIMBS]; + Limb Y[P384_LIMBS]; + Limb Z[P384_LIMBS]; +} P384_POINT; + +typedef struct { + Limb X[P384_LIMBS]; + Limb Y[P384_LIMBS]; +} P384_POINT_AFFINE; + + +#endif // OPENSSL_HEADER_EC_ECP_NISTZ384_H + +-------------------------------------------------------------------------------- + +ISC License + +Used by: + - ring 0.17.14 + +// Copyright 2015-2016 Brian Smith. +// +// Permission to use, copy, modify, and/or distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY +// SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION +// OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN +// CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +//! EdDSA Signatures. + +use super::ops::ELEM_LEN; +use crate::digest; + +pub mod signing; +pub mod verification; + +/// The length of an Ed25519 public key. +pub const ED25519_PUBLIC_KEY_LEN: usize = ELEM_LEN; + +pub fn eddsa_digest(signature_r: &[u8], public_key: &[u8], msg: &[u8]) -> digest::Digest { + let mut ctx = digest::Context::new(&digest::SHA512); + ctx.update(signature_r); + ctx.update(public_key); + ctx.update(msg); + ctx.finish() +} + +-------------------------------------------------------------------------------- + +ISC License + Used by: - untrusted 0.9.0 @@ -373,6 +735,423 @@ Used by: ISC License +Used by: + - ring 0.17.14 + +// Copyright 2015-2022 Brian Smith. +// +// Permission to use, copy, modify, and/or distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY +// SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION +// OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN +// CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +use crate::limb::Limb; + +#[derive(Clone, Copy)] +#[repr(transparent)] +pub struct N0([Limb; 2]); + +impl N0 { + #[cfg(feature = "alloc")] + pub(super) const LIMBS_USED: usize = 64 / crate::limb::LIMB_BITS; + + #[inline] + pub const fn precalculated(n0: u64) -> Self { + #[cfg(target_pointer_width = "64")] + { + Self([n0, 0]) + } + + #[cfg(target_pointer_width = "32")] + { + Self([n0 as Limb, (n0 >> crate::limb::LIMB_BITS) as Limb]) + } + } +} + +-------------------------------------------------------------------------------- + +ISC License + +Used by: + - ring 0.17.14 + +// Copyright 2015-2025 Brian Smith. +// +// Permission to use, copy, modify, and/or distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY +// SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION +// OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN +// CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +use crate::{bb, error}; + +#[deprecated( + note = "To be removed. Internal function not intended for external use with no promises regarding side channels." +)] +pub fn verify_slices_are_equal(a: &[u8], b: &[u8]) -> Result<(), error::Unspecified> { + bb::verify_slices_are_equal(a, b) +} + +-------------------------------------------------------------------------------- + +ISC License + +Used by: + - ring 0.17.14 + +// Copyright 2016 Brian Smith. +// +// Permission to use, copy, modify, and/or distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY +// SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION +// OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN +// CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +//! Elliptic curve operations and schemes using Curve25519. + +pub mod ed25519; + +pub mod x25519; + +mod ops; +mod scalar; + +-------------------------------------------------------------------------------- + +ISC License + +Used by: + - ring 0.17.14 + +// Copyright 2016-2024 Brian Smith. +// +// Permission to use, copy, modify, and/or distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY +// SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION +// OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN +// CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +use crate::error::{KeyRejected, Unspecified}; + +impl From for Unspecified { + fn from(source: untrusted::EndOfInput) -> Self { + super::erase(source) + } +} + +impl From for Unspecified { + fn from(source: core::array::TryFromSliceError) -> Self { + super::erase(source) + } +} + +impl From for Unspecified { + fn from(source: KeyRejected) -> Self { + super::erase(source) + } +} + +-------------------------------------------------------------------------------- + +ISC License + +Used by: + - ring 0.17.14 + +// Copyright 2018 Brian Smith. +// +// Permission to use, copy, modify, and/or distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY +// SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION +// OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN +// CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +//! Serialization and deserialization. + +#[doc(hidden)] +pub mod der; + +#[cfg(feature = "alloc")] +mod writer; + +#[cfg(feature = "alloc")] +pub(crate) mod der_writer; + +pub(crate) mod positive; + +pub use self::positive::Positive; + +#[cfg(feature = "alloc")] +pub(crate) use self::writer::TooLongError; + +-------------------------------------------------------------------------------- + +ISC License + +Used by: + - ring 0.17.14 + +// Copyright 2019-2024 Brian Smith. +// +// Permission to use, copy, modify, and/or distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY +// SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION +// OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN +// CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +use super::BlockLen; + +pub(super) use self::{ + sha2_32::{block_data_order_32, State32, SHA256_BLOCK_LEN}, + sha2_64::{block_data_order_64, State64, SHA512_BLOCK_LEN}, +}; + +pub(super) const CHAINING_WORDS: usize = 8; + +#[cfg(any( + all(target_arch = "aarch64", target_endian = "little"), + all(target_arch = "arm", target_endian = "little"), + target_arch = "x86_64" +))] +#[macro_use] +mod ffi; + +pub(super) mod fallback; +mod sha2_32; +mod sha2_64; + +-------------------------------------------------------------------------------- + +ISC License + +Used by: + - ring 0.17.14 + +// Copyright 2024 Brian Smith. +// +// Permission to use, copy, modify, and/or distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY +// SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION +// OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN +// CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +// TODO(MSRV 1.76): Replace with `core::ptr::from_mut`. +#[allow(dead_code)] +#[inline(always)] +pub fn from_mut(r: &mut T) -> *mut T { + r +} + +// TODO(MSRV 1.76): Replace with `core::ptr::from_ref`. +#[allow(dead_code)] +#[inline(always)] +pub const fn from_ref(r: &T) -> *const T { + r +} + +-------------------------------------------------------------------------------- + +ISC License + +Used by: + - ring 0.17.14 + +// Copyright 2024 Brian Smith. +// +// Permission to use, copy, modify, and/or distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY +// SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION +// OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN +// CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +//! Integration tests for non-public APIs. + +mod bits_tests; + +-------------------------------------------------------------------------------- + +ISC License + +Used by: + - ring 0.17.14 + +// Copyright 2024 Brian Smith. +// +// Permission to use, copy, modify, and/or distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY +// SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION +// OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN +// CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +pub use self::{ + array::Array, + base::{IndexError, Overlapping}, + partial_block::PartialBlock, +}; + +mod array; +mod base; +mod partial_block; + +-------------------------------------------------------------------------------- + +ISC License + +Used by: + - ring 0.17.14 + +// Copyright 2025 Brian Smith. +// +// Permission to use, copy, modify, and/or distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY +// SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION +// OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN +// CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +#![cfg(all(target_arch = "aarch64", target_endian = "little"))] + +pub(in super::super) mod mont; + +-------------------------------------------------------------------------------- + +ISC License + +Used by: + - ring 0.17.14 + +// Copyright 2025 Brian Smith. +// +// Permission to use, copy, modify, and/or distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY +// SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION +// OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN +// CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +#![cfg(target_arch = "x86_64")] + +pub(in super::super::super) mod mont; + +-------------------------------------------------------------------------------- + +ISC License + +Used by: + - ring 0.17.14 + +// Copyright 2025 Brian Smith. +// +// Permission to use, copy, modify, and/or distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY +// SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION +// OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN +// CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +mod storage; + +pub(super) use self::storage::{AlignedStorage, LIMBS_PER_CHUNK}; + +-------------------------------------------------------------------------------- + +ISC License + +Used by: + - ring 0.17.14 + +// Copyright 2025 Brian Smith. +// +// Permission to use, copy, modify, and/or distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY +// SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION +// OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN +// CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +pub(super) mod aarch64; +pub(super) mod x86_64; + +-------------------------------------------------------------------------------- + +ISC License + Used by: - ring 0.17.14 @@ -1305,6 +2084,39 @@ MIT License Copyright (c) [2021] [Marvin Countryman] +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +-------------------------------------------------------------------------------- + +MIT License + +Used by: + - miniz_oxide 0.8.9 + +MIT License + +Copyright 2013-2014 RAD Game Tools and Valve Software +Copyright 2010-2014 Rich Geldreich and Tenacious Software LLC +Copyright (c) 2017 Frommi +Copyright (c) 2017-2024 oyvindln + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights @@ -1525,6 +2337,36 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- +MIT License + +Used by: + - ureq 2.12.1 + +The MIT License (MIT) + +Copyright (c) 2015 The tiny-http Contributors +Copyright (c) 2015 The rust-chunked-transfer Contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +-------------------------------------------------------------------------------- + Unicode License v3 Used by: diff --git a/npm/native/Cargo.lock b/npm/native/Cargo.lock index c79544c..08e7f6d 100644 --- a/npm/native/Cargo.lock +++ b/npm/native/Cargo.lock @@ -359,6 +359,7 @@ version = "0.1.0" dependencies = [ "cc", "core-foundation", + "libc", "log", "psl", "system-configuration", diff --git a/src/platform/linux.rs b/src/platform/linux.rs index e8f5a72..1802e90 100644 --- a/src/platform/linux.rs +++ b/src/platform/linux.rs @@ -248,9 +248,11 @@ pub(crate) fn dns_search_domains() -> Vec { #[cfg(test)] mod tests { use super::*; + #[cfg(target_arch = "x86_64")] use std::path::Path; use std::time::{Duration, Instant}; + #[cfg(target_arch = "x86_64")] const WATCHER_SUBPROCESS_ENV: &str = "OS_PROXY_RESOLVER_WATCHER_SUBPROCESS"; fn spawn_test_watcher() -> Watcher { @@ -297,8 +299,10 @@ mod tests { true } + #[cfg(target_arch = "x86_64")] struct ProcessGuard(Option); + #[cfg(target_arch = "x86_64")] impl Drop for ProcessGuard { fn drop(&mut self) { let Some(pid) = self.0 else { @@ -333,6 +337,10 @@ mod tests { ); } + // `cross` runs foreign-architecture test binaries through QEMU but does not + // configure child processes to do so, so a test binary can only re-exec + // itself in the host-compatible x86_64 jobs. + #[cfg(target_arch = "x86_64")] #[test] fn watcher_exits_when_parent_process_exits_without_drop() { let pid_file = std::env::temp_dir().join(format!( @@ -362,6 +370,7 @@ mod tests { assert!(exited, "watcher survived after its parent process exited"); } + #[cfg(target_arch = "x86_64")] #[test] fn watcher_parent_death_subprocess_helper() { let Some(pid_file) = std::env::var_os(WATCHER_SUBPROCESS_ENV) else { From a4bf91d6379b127f87a69fdd8dd173e373eb645e Mon Sep 17 00:00:00 2001 From: Christof Marti Date: Mon, 24 Aug 2026 21:01:05 +0000 Subject: [PATCH 4/5] Prevent proxy watchers from inheriting file descriptors Mark every non-stdio descriptor close-on-exec before launching dconf or gsettings, with an older-kernel fcntl fallback. Cover the behavior with a regression test using an explicitly inheritable descriptor. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- src/platform/linux.rs | 109 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 107 insertions(+), 2 deletions(-) diff --git a/src/platform/linux.rs b/src/platform/linux.rs index 1802e90..53f774e 100644 --- a/src/platform/linux.rs +++ b/src/platform/linux.rs @@ -19,7 +19,7 @@ use super::{OsProxyConfig, StaticRules}; use crate::bypass::BypassRules; use crate::types::{LinuxProxyConfig, PlatformProxyConfig, ProxyKind}; use std::collections::HashMap; -use std::io::BufRead; +use std::io::{self, BufRead}; use std::os::unix::process::CommandExt; use std::process::{Child, Command, Stdio}; use std::sync::{mpsc, Arc, Mutex}; @@ -202,9 +202,11 @@ fn spawn_watcher_thread( } } -/// Configure a proxy watcher to terminate if its owning process exits without dropping it. +/// Configure a proxy watcher to terminate with its owner and inherit only standard I/O. fn configure_watcher_command(command: &mut Command) { let expected_parent = std::process::id() as libc::pid_t; + let file_descriptor_limit = + file_descriptor_limit().map_err(|error| error.raw_os_error().unwrap_or(libc::EIO)); command .stdin(Stdio::null()) .stdout(Stdio::piped()) @@ -221,11 +223,84 @@ fn configure_watcher_command(command: &mut Command) { if libc::getppid() != expected_parent { libc::_exit(1); } + mark_file_descriptors_close_on_exec(file_descriptor_limit)?; Ok(()) }); } } +fn file_descriptor_limit() -> io::Result { + let mut limit = std::mem::MaybeUninit::::uninit(); + // SAFETY: getrlimit initializes the supplied rlimit on success. + if unsafe { libc::getrlimit(libc::RLIMIT_NOFILE, limit.as_mut_ptr()) } == -1 { + return Err(io::Error::last_os_error()); + } + // SAFETY: the successful getrlimit call initialized limit. + let limit = unsafe { limit.assume_init() }.rlim_cur; + Ok(limit.min(libc::c_int::MAX as libc::rlim_t) as libc::c_int) +} + +fn mark_file_descriptors_close_on_exec( + file_descriptor_limit: Result, +) -> io::Result<()> { + // CLOSE_RANGE_CLOEXEC preserves Rust's internal exec-error pipe until exec + // succeeds while preventing every non-stdio descriptor from reaching the + // watcher program. + // SAFETY: close_range operates on the calling process's descriptor table. + loop { + let result = unsafe { + libc::syscall( + libc::SYS_close_range, + 3 as libc::c_uint, + libc::c_uint::MAX, + libc::CLOSE_RANGE_CLOEXEC, + ) + }; + if result == 0 { + return Ok(()); + } + if io::Error::last_os_error().raw_os_error() != Some(libc::EINTR) { + break; + } + } + + // Older kernels and restricted seccomp profiles may not support + // close_range. fcntl is slower but provides equivalent behavior. + let file_descriptor_limit = file_descriptor_limit.map_err(io::Error::from_raw_os_error)?; + for fd in 3..file_descriptor_limit { + let flags = loop { + // SAFETY: fcntl accepts any integer descriptor and reports EBADF + // for descriptors that are not open. + let flags = unsafe { libc::fcntl(fd, libc::F_GETFD) }; + if flags != -1 { + break flags; + } + let error = io::Error::last_os_error(); + match error.raw_os_error() { + Some(libc::EBADF) => break -1, + Some(libc::EINTR) => continue, + _ => return Err(error), + } + }; + if flags == -1 { + continue; + } + if flags & libc::FD_CLOEXEC == 0 { + loop { + // SAFETY: flags came from F_GETFD for this descriptor. + if unsafe { libc::fcntl(fd, libc::F_SETFD, flags | libc::FD_CLOEXEC) } != -1 { + break; + } + let error = io::Error::last_os_error(); + if error.raw_os_error() != Some(libc::EINTR) { + return Err(error); + } + } + } + } + Ok(()) +} + impl Drop for Watcher { fn drop(&mut self) { if let Some(mut child) = self.child.lock().unwrap_or_else(|e| e.into_inner()).take() { @@ -248,6 +323,7 @@ pub(crate) fn dns_search_domains() -> Vec { #[cfg(test)] mod tests { use super::*; + use std::os::fd::AsRawFd; #[cfg(target_arch = "x86_64")] use std::path::Path; use std::time::{Duration, Instant}; @@ -337,6 +413,35 @@ mod tests { ); } + #[test] + fn watcher_does_not_inherit_unrelated_file_descriptors() { + let file = std::fs::File::open("/dev/null").expect("failed to open test descriptor"); + let fd = file.as_raw_fd(); + // SAFETY: fd belongs to file and remains open for the duration of the test. + let original_flags = unsafe { libc::fcntl(fd, libc::F_GETFD) }; + assert_ne!(original_flags, -1, "failed to read descriptor flags"); + // SAFETY: fd belongs to file and original_flags came from F_GETFD. + assert_ne!( + unsafe { libc::fcntl(fd, libc::F_SETFD, original_flags & !libc::FD_CLOEXEC) }, + -1, + "failed to make test descriptor inheritable" + ); + + let watcher = spawn_test_watcher(); + // Restore the parent's flags immediately; the child has its own descriptor table. + // SAFETY: fd still belongs to file and original_flags came from F_GETFD. + assert_ne!( + unsafe { libc::fcntl(fd, libc::F_SETFD, original_flags) }, + -1, + "failed to restore test descriptor flags" + ); + let pid = watcher_child_pid(&watcher); + assert!( + !std::path::Path::new(&format!("/proc/{pid}/fd/{fd}")).exists(), + "watcher inherited unrelated descriptor {fd}" + ); + } + // `cross` runs foreign-architecture test binaries through QEMU but does not // configure child processes to do so, so a test binary can only re-exec // itself in the host-compatible x86_64 jobs. From 6da9fa0ff07d06b0b8086fb07108cff86365875c Mon Sep 17 00:00:00 2001 From: Christof Marti Date: Mon, 24 Aug 2026 21:11:14 +0000 Subject: [PATCH 5/5] Prepare 0.4.0 release Add the project changelog and align the facade and platform package manifests on version 0.4.0. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- CHANGELOG.md | 16 ++++++++++++++ npm/platforms/darwin-arm64/package.json | 2 +- npm/platforms/darwin-x64/package.json | 2 +- .../linux-arm-gnueabihf/package.json | 2 +- npm/platforms/linux-arm64-gnu/package.json | 2 +- npm/platforms/linux-arm64-musl/package.json | 2 +- npm/platforms/linux-x64-gnu/package.json | 2 +- npm/platforms/linux-x64-musl/package.json | 2 +- npm/platforms/win32-arm64-msvc/package.json | 2 +- npm/platforms/win32-x64-msvc/package.json | 2 +- package.json | 21 ++++++++++--------- 11 files changed, 36 insertions(+), 19 deletions(-) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..41732f4 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,16 @@ +# Changelog + +Notable changes to this project will be documented in this file. + +## 0.4.0 + +### Fixed + +- Terminated Linux `dconf` and `gsettings` proxy watchers when their owning + process exits without running Rust destructors. +- Prevented Linux proxy watchers from inheriting unrelated file descriptors, + including Chromium shared-memory resources. + +### Documentation + +- Directed support requests to the `microsoft/vscode` issue tracker. diff --git a/npm/platforms/darwin-arm64/package.json b/npm/platforms/darwin-arm64/package.json index db45536..41ee891 100644 --- a/npm/platforms/darwin-arm64/package.json +++ b/npm/platforms/darwin-arm64/package.json @@ -1,6 +1,6 @@ { "name": "@vscode/os-proxy-resolver-darwin-arm64", - "version": "0.3.0", + "version": "0.4.0", "description": "Native binding for @vscode/os-proxy-resolver on macOS arm64", "main": "os_proxy_resolver.node", "files": ["os_proxy_resolver.node", "LICENSE.txt", "ThirdPartyNotices.txt"], diff --git a/npm/platforms/darwin-x64/package.json b/npm/platforms/darwin-x64/package.json index 6ed04da..63e06a6 100644 --- a/npm/platforms/darwin-x64/package.json +++ b/npm/platforms/darwin-x64/package.json @@ -1,6 +1,6 @@ { "name": "@vscode/os-proxy-resolver-darwin-x64", - "version": "0.3.0", + "version": "0.4.0", "description": "Native binding for @vscode/os-proxy-resolver on macOS x64", "main": "os_proxy_resolver.node", "files": ["os_proxy_resolver.node", "LICENSE.txt", "ThirdPartyNotices.txt"], diff --git a/npm/platforms/linux-arm-gnueabihf/package.json b/npm/platforms/linux-arm-gnueabihf/package.json index 3b2d53b..4a6adb4 100644 --- a/npm/platforms/linux-arm-gnueabihf/package.json +++ b/npm/platforms/linux-arm-gnueabihf/package.json @@ -1,6 +1,6 @@ { "name": "@vscode/os-proxy-resolver-linux-arm-gnueabihf", - "version": "0.3.0", + "version": "0.4.0", "description": "Native binding for @vscode/os-proxy-resolver on Linux armhf", "main": "os_proxy_resolver.node", "files": ["os_proxy_resolver.node", "LICENSE.txt", "ThirdPartyNotices.txt"], diff --git a/npm/platforms/linux-arm64-gnu/package.json b/npm/platforms/linux-arm64-gnu/package.json index cb521ef..13ecf32 100644 --- a/npm/platforms/linux-arm64-gnu/package.json +++ b/npm/platforms/linux-arm64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@vscode/os-proxy-resolver-linux-arm64-gnu", - "version": "0.3.0", + "version": "0.4.0", "description": "Native binding for @vscode/os-proxy-resolver on Linux arm64", "main": "os_proxy_resolver.node", "files": ["os_proxy_resolver.node", "LICENSE.txt", "ThirdPartyNotices.txt"], diff --git a/npm/platforms/linux-arm64-musl/package.json b/npm/platforms/linux-arm64-musl/package.json index a46aee6..5828627 100644 --- a/npm/platforms/linux-arm64-musl/package.json +++ b/npm/platforms/linux-arm64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@vscode/os-proxy-resolver-linux-arm64-musl", - "version": "0.3.0", + "version": "0.4.0", "description": "Native binding for @vscode/os-proxy-resolver on Linux arm64 (musl)", "main": "os_proxy_resolver.node", "files": ["os_proxy_resolver.node", "LICENSE.txt", "ThirdPartyNotices.txt"], diff --git a/npm/platforms/linux-x64-gnu/package.json b/npm/platforms/linux-x64-gnu/package.json index edc46f7..be528e1 100644 --- a/npm/platforms/linux-x64-gnu/package.json +++ b/npm/platforms/linux-x64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@vscode/os-proxy-resolver-linux-x64-gnu", - "version": "0.3.0", + "version": "0.4.0", "description": "Native binding for @vscode/os-proxy-resolver on Linux x64", "main": "os_proxy_resolver.node", "files": ["os_proxy_resolver.node", "LICENSE.txt", "ThirdPartyNotices.txt"], diff --git a/npm/platforms/linux-x64-musl/package.json b/npm/platforms/linux-x64-musl/package.json index 49c2b7c..bfab652 100644 --- a/npm/platforms/linux-x64-musl/package.json +++ b/npm/platforms/linux-x64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@vscode/os-proxy-resolver-linux-x64-musl", - "version": "0.3.0", + "version": "0.4.0", "description": "Native binding for @vscode/os-proxy-resolver on Linux x64 (musl)", "main": "os_proxy_resolver.node", "files": ["os_proxy_resolver.node", "LICENSE.txt", "ThirdPartyNotices.txt"], diff --git a/npm/platforms/win32-arm64-msvc/package.json b/npm/platforms/win32-arm64-msvc/package.json index 56377d3..5793a64 100644 --- a/npm/platforms/win32-arm64-msvc/package.json +++ b/npm/platforms/win32-arm64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@vscode/os-proxy-resolver-win32-arm64-msvc", - "version": "0.3.0", + "version": "0.4.0", "description": "Native binding for @vscode/os-proxy-resolver on Windows arm64", "main": "os_proxy_resolver.node", "files": ["os_proxy_resolver.node", "LICENSE.txt", "ThirdPartyNotices.txt"], diff --git a/npm/platforms/win32-x64-msvc/package.json b/npm/platforms/win32-x64-msvc/package.json index 2a4aee1..80c3b8a 100644 --- a/npm/platforms/win32-x64-msvc/package.json +++ b/npm/platforms/win32-x64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@vscode/os-proxy-resolver-win32-x64-msvc", - "version": "0.3.0", + "version": "0.4.0", "description": "Native binding for @vscode/os-proxy-resolver on Windows x64", "main": "os_proxy_resolver.node", "files": ["os_proxy_resolver.node", "LICENSE.txt", "ThirdPartyNotices.txt"], diff --git a/package.json b/package.json index 3d42308..5f3f686 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@vscode/os-proxy-resolver", - "version": "0.3.0", + "version": "0.4.0", "description": "Resolve the operating system proxy configuration from Node.js", "main": "index.js", "types": "index.d.ts", @@ -8,6 +8,7 @@ "index.js", "index.d.ts", "platform.js", + "CHANGELOG.md", "LICENSE.txt", "ThirdPartyNotices.txt" ], @@ -30,14 +31,14 @@ "verify:packages": "node npm/scripts/verify-packages.js" }, "optionalDependencies": { - "@vscode/os-proxy-resolver-darwin-arm64": "0.3.0", - "@vscode/os-proxy-resolver-darwin-x64": "0.3.0", - "@vscode/os-proxy-resolver-linux-arm-gnueabihf": "0.3.0", - "@vscode/os-proxy-resolver-linux-arm64-gnu": "0.3.0", - "@vscode/os-proxy-resolver-linux-arm64-musl": "0.3.0", - "@vscode/os-proxy-resolver-linux-x64-gnu": "0.3.0", - "@vscode/os-proxy-resolver-linux-x64-musl": "0.3.0", - "@vscode/os-proxy-resolver-win32-arm64-msvc": "0.3.0", - "@vscode/os-proxy-resolver-win32-x64-msvc": "0.3.0" + "@vscode/os-proxy-resolver-darwin-arm64": "0.4.0", + "@vscode/os-proxy-resolver-darwin-x64": "0.4.0", + "@vscode/os-proxy-resolver-linux-arm-gnueabihf": "0.4.0", + "@vscode/os-proxy-resolver-linux-arm64-gnu": "0.4.0", + "@vscode/os-proxy-resolver-linux-arm64-musl": "0.4.0", + "@vscode/os-proxy-resolver-linux-x64-gnu": "0.4.0", + "@vscode/os-proxy-resolver-linux-x64-musl": "0.4.0", + "@vscode/os-proxy-resolver-win32-arm64-msvc": "0.4.0", + "@vscode/os-proxy-resolver-win32-x64-msvc": "0.4.0" } } \ No newline at end of file