tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit 57129f85b8b10593c4ce23a1eaf62604bccae7bd
parent cd438e5cf711cad96ad724ab775fe862b3c1dcc8
Author: Johannes Jörg Schmidt <schmidt@tf-fabrik.de>
Date:   Thu,  2 Oct 2025 08:12:32 +0000

Bug 1966326 - use rust logins: setup r=markh,nss-reviewers,bbeurdouche

Include the Application Services components `logins` and
`init_rust_components` in firefox desktop, configure uniffi and
configure nss build system to use additional pointers.

Differential Revision: https://phabricator.services.mozilla.com/D260121

Diffstat:
MCargo.toml | 2++
Msecurity/nss.symbols | 1+
Mtoolkit/components/uniffi-bindgen-gecko-js/components/Cargo.toml | 2++
Mtoolkit/components/uniffi-bindgen-gecko-js/components/lib.rs | 2++
Mtoolkit/components/uniffi-bindgen-gecko-js/components/moz.build | 2++
Mtoolkit/components/uniffi-bindgen-gecko-js/config.toml | 46++++++++++++++++++++++++++++++++++++++++++++++
6 files changed, 55 insertions(+), 0 deletions(-)

diff --git a/Cargo.toml b/Cargo.toml @@ -268,6 +268,8 @@ tabs = { git = "https://github.com/mozilla/application-services", rev = "f6f667f tracing-support = { git = "https://github.com/mozilla/application-services", rev = "f6f667f590ac15367fc37eb1ad3a6bdea4ffc526" } viaduct = { git = "https://github.com/mozilla/application-services", rev = "f6f667f590ac15367fc37eb1ad3a6bdea4ffc526" } webext-storage = { git = "https://github.com/mozilla/application-services", rev = "f6f667f590ac15367fc37eb1ad3a6bdea4ffc526" } +logins = { git = "https://github.com/mozilla/application-services", rev = "f6f667f590ac15367fc37eb1ad3a6bdea4ffc526", features = ["keydb"] } +init_rust_components = { git = "https://github.com/mozilla/application-services", rev = "f6f667f590ac15367fc37eb1ad3a6bdea4ffc526", features = ["keydb"] } # Patched version of zip 2.4.2 to allow for reading omnijars. zip = { path = "third_party/rust/zip" } diff --git a/security/nss.symbols b/security/nss.symbols @@ -396,6 +396,7 @@ PK11_ImportDERPrivateKeyInfoAndReturnKey PK11_ImportEncryptedPrivateKeyInfoAndReturnKey PK11_ImportPublicKey PK11_ImportSymKey +PK11_ImportSymKeyWithFlags PK11_InitPin PK11_IsDisabled PK11_IsFIPS diff --git a/toolkit/components/uniffi-bindgen-gecko-js/components/Cargo.toml b/toolkit/components/uniffi-bindgen-gecko-js/components/Cargo.toml @@ -26,6 +26,8 @@ relevancy = "0.1" webext-storage = "0.1" error-support = { version = "0.1", features = ["tracing-logging", "tracing-reporting"] } tracing-support = "0.1" +logins = { version = "0.1", features = ["keydb"] } +init_rust_components = { version = "0.1", features = ["keydb"] } [features] # Should we depend on xpcom crates? diff --git a/toolkit/components/uniffi-bindgen-gecko-js/components/lib.rs b/toolkit/components/uniffi-bindgen-gecko-js/components/lib.rs @@ -12,6 +12,8 @@ mod reexport_appservices_uniffi_scaffolding { filter_adult::uniffi_reexport_scaffolding!(); error_support::uniffi_reexport_scaffolding!(); tracing_support::uniffi_reexport_scaffolding!(); + logins::uniffi_reexport_scaffolding!(); + init_rust_components::uniffi_reexport_scaffolding!(); } // Define extern "C" versions of these UniFFI functions, so that they can be called from C++ diff --git a/toolkit/components/uniffi-bindgen-gecko-js/components/moz.build b/toolkit/components/uniffi-bindgen-gecko-js/components/moz.build @@ -7,6 +7,8 @@ MOZ_SRC_FILES += [ "generated/RustContextId.sys.mjs", "generated/RustFilterAdult.sys.mjs", + "generated/RustInitRustComponents.sys.mjs", + "generated/RustLogins.sys.mjs", "generated/RustRelevancy.sys.mjs", "generated/RustRemoteSettings.sys.mjs", "generated/RustSearch.sys.mjs", diff --git a/toolkit/components/uniffi-bindgen-gecko-js/config.toml b/toolkit/components/uniffi-bindgen-gecko-js/config.toml @@ -165,3 +165,49 @@ lower = "{}.getTime()" type_name = "Date" lift = "new Date({} * 1000)" lower = "{}.getTime() / 1000" + +[init_rust_components.async_wrappers] +"initialize" = "AsyncWrapped" + +[logins.async_wrappers] +"EncryptorDecryptor.decrypt" = "Sync" +"EncryptorDecryptor.encrypt" = "Sync" +"KeyManager.get_key" = "Sync" +"LoginStore.add" = "Sync" +"LoginStore.add_many" = "Sync" +"LoginStore.add_many_with_meta" = "Sync" +"LoginStore.add_or_update" = "Sync" +"LoginStore.add_with_meta" = "Sync" +"LoginStore.count" = "Sync" +"LoginStore.count_by_form_action_origin" = "Sync" +"LoginStore.count_by_origin" = "Sync" +"LoginStore.delete" = "Sync" +"LoginStore.delete_many" = "Sync" +"LoginStore.delete_undecryptable_records_for_remote_replacement" = "Sync" +"LoginStore.find_login_to_update" = "Sync" +"LoginStore.get" = "Sync" +"LoginStore.get_by_base_domain" = "Sync" +"LoginStore.get_checkpoint" = "Sync" +"LoginStore.has_logins_by_base_domain" = "Sync" +"LoginStore.is_empty" = "Sync" +"LoginStore.list" = "Sync" +"LoginStore.new" = "Sync" +"LoginStore.register_with_sync_manager" = "Sync" +"LoginStore.reset" = "Sync" +"LoginStore.run_maintenance" = "AsyncWrapped" +"LoginStore.set_checkpoint" = "Sync" +"LoginStore.shutdown" = "Sync" +"LoginStore.touch" = "Sync" +"LoginStore.update" = "Sync" +"LoginStore.wipe_local" = "Sync" +"ManagedEncryptorDecryptor.new" = "Sync" +"NSSKeyManager.into_dyn_key_manager" = "Sync" +"NSSKeyManager.new" = "Sync" +"StaticKeyManager.new" = "Sync" +"check_canary" = "Sync" +"create_canary" = "Sync" +"create_key" = "Sync" +"create_login_store_with_nss_keymanager" = "Sync" +"create_login_store_with_static_key_manager" = "Sync" +"create_managed_encdec" = "Sync" +"create_static_key_manager" = "Sync"