Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 18 additions & 18 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion components/autofill/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ url = { version = "2.2", features = ["serde"] }

[dev-dependencies]
libsqlite3-sys = { version = "0.35.0" }
nss = { path = "../support/rc_crypto/nss" }
nss-as = { path = "../support/rc_crypto/nss" }
error-support = { path = "../support/error", features=["testing"] }

[build-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion components/autofill/src/db/credit_cards.rs
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ pub(crate) mod tests {
use super::*;
use crate::db::test::new_mem_db;
use crate::encryption::EncryptorDecryptor;
use nss::ensure_initialized;
use nss_as::ensure_initialized;
use sync15::bso::IncomingBso;

pub fn get_all(
Expand Down
2 changes: 1 addition & 1 deletion components/autofill/src/db/store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ mod tests {
use super::*;
use crate::db::test::new_mem_db;
use crate::encryption::EncryptorDecryptor;
use nss::ensure_initialized;
use nss_as::ensure_initialized;

#[test]
fn test_autofill_meta() -> Result<()> {
Expand Down
2 changes: 1 addition & 1 deletion components/autofill/src/encryption.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ pub fn create_autofill_key() -> ApiResult<String> {
#[cfg(test)]
mod test {
use super::*;
use nss::ensure_initialized;
use nss_as::ensure_initialized;

#[test]
fn test_encrypt() {
Expand Down
2 changes: 1 addition & 1 deletion components/autofill/src/sync/credit_card/incoming.rs
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ mod tests {

use error_support::{info, trace};
use interrupt_support::NeverInterrupts;
use nss::ensure_initialized;
use nss_as::ensure_initialized;
use serde_json::{json, Map, Value};
use sql_support::ConnExt;

Expand Down
2 changes: 1 addition & 1 deletion components/autofill/src/sync/credit_card/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ fn test_last_4() {

#[test]
fn test_to_from_payload() {
nss::ensure_initialized();
nss_as::ensure_initialized();
let key = crate::encryption::create_autofill_key().unwrap();
let cc_number = "1234567812345678";
let cc_number_enc =
Expand Down
2 changes: 1 addition & 1 deletion components/autofill/src/sync/engine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ mod tests {
use crate::db::schema::create_empty_sync_temp_tables;
use crate::encryption::EncryptorDecryptor;
use crate::sync::{IncomingBso, UnknownFields};
use nss::ensure_initialized;
use nss_as::ensure_initialized;
use sql_support::ConnExt;

impl InternalCreditCard {
Expand Down
2 changes: 1 addition & 1 deletion components/fxa-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ anyhow = "1.0"
sync-guid = { path = "../support/guid", features = ["random"] }
uniffi = { version = "0.31" }
payload-support = { path = "../support/payload" }
nss = { path = "../support/rc_crypto/nss" }
nss-as = { path = "../support/rc_crypto/nss" }

[build-dependencies]
uniffi = { version = "0.31", features = ["build"] }
Expand Down
2 changes: 1 addition & 1 deletion components/fxa-client/src/internal/close_tabs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ mod tests {
use std::{collections::HashSet, sync::Arc};

use mockall::predicate::{always, eq};
use nss::ensure_initialized;
use nss_as::ensure_initialized;
use serde_json::json;

use crate::{
Expand Down
2 changes: 1 addition & 1 deletion components/fxa-client/src/internal/device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ mod tests {
use crate::ScopedKey;
use mockall::predicate::always;
use mockall::predicate::eq;
use nss::ensure_initialized;
use nss_as::ensure_initialized;
use std::collections::HashSet;
use std::sync::Arc;

Expand Down
30 changes: 15 additions & 15 deletions components/fxa-client/src/internal/oauth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,7 @@ mod tests {

#[test]
fn test_oauth_flow_url() {
nss::ensure_initialized();
nss_as::ensure_initialized();
let config = Config::new_with_mock_well_known_fxa_client_configuration(
"https://mock-fxa.example.com",
"12345678",
Expand Down Expand Up @@ -697,7 +697,7 @@ mod tests {

#[test]
fn test_force_auth_url() {
nss::ensure_initialized();
nss_as::ensure_initialized();
let config = Config::stable_dev("12345678", "https://foo.bar");
let mut fxa = FirefoxAccount::with_config(config);
let email = "test@example.com";
Expand All @@ -716,7 +716,7 @@ mod tests {

#[test]
fn test_webchannel_context_url() {
nss::ensure_initialized();
nss_as::ensure_initialized();
const SCOPES: &[&str] = &["https://identity.mozilla.com/apps/oldsync"];
let config = Config::new_with_mock_well_known_fxa_client_configuration(
"https://mock-fxa.example.com",
Expand All @@ -736,7 +736,7 @@ mod tests {

#[test]
fn test_webchannel_pairing_context_url() {
nss::ensure_initialized();
nss_as::ensure_initialized();
const SCOPES: &[&str] = &["https://identity.mozilla.com/apps/oldsync"];
const PAIRING_URL: &str = "https://accounts.firefox.com/pair#channel_id=658db7fe98b249a5897b884f98fb31b7&channel_key=1hIDzTj5oY2HDeSg_jA2DhcOcAn5Uqq0cAYlZRNUIo4";

Expand All @@ -763,7 +763,7 @@ mod tests {

#[test]
fn test_pairing_flow_url() {
nss::ensure_initialized();
nss_as::ensure_initialized();
const SCOPES: &[&str] = &["https://identity.mozilla.com/apps/oldsync"];
const PAIRING_URL: &str = "https://accounts.firefox.com/pair#channel_id=658db7fe98b249a5897b884f98fb31b7&channel_key=1hIDzTj5oY2HDeSg_jA2DhcOcAn5Uqq0cAYlZRNUIo4";
const EXPECTED_URL: &str = "https://accounts.firefox.com/pair/supp?client_id=12345678&redirect_uri=https%3A%2F%2Ffoo.bar&scope=https%3A%2F%2Fidentity.mozilla.com%2Fapps%2Foldsync&state=SmbAA_9EA5v1R2bgIPeWWw&code_challenge_method=S256&code_challenge=ZgHLPPJ8XYbXpo7VIb7wFw0yXlTa6MUOVfGiADt0JSM&access_type=offline&keys_jwk=eyJjcnYiOiJQLTI1NiIsImt0eSI6IkVDIiwieCI6Ing5LUltQjJveDM0LTV6c1VmbW5sNEp0Ti14elV2eFZlZXJHTFRXRV9BT0kiLCJ5IjoiNXBKbTB3WGQ4YXdHcm0zREl4T1pWMl9qdl9tZEx1TWlMb1RkZ1RucWJDZyJ9#channel_id=658db7fe98b249a5897b884f98fb31b7&channel_key=1hIDzTj5oY2HDeSg_jA2DhcOcAn5Uqq0cAYlZRNUIo4";
Expand Down Expand Up @@ -838,7 +838,7 @@ mod tests {

#[test]
fn test_pairing_flow_origin_mismatch() {
nss::ensure_initialized();
nss_as::ensure_initialized();
static PAIRING_URL: &str = "https://bad.origin.com/pair#channel_id=foo&channel_key=bar";
let config = Config::stable_dev("12345678", "https://foo.bar");
let mut fxa = FirefoxAccount::with_config(config);
Expand All @@ -864,7 +864,7 @@ mod tests {

#[test]
fn test_check_authorization_status() {
nss::ensure_initialized();
nss_as::ensure_initialized();
let config = Config::stable_dev("12345678", "https://foo.bar");
let mut fxa = FirefoxAccount::with_config(config);

Expand All @@ -888,7 +888,7 @@ mod tests {

#[test]
fn test_check_authorization_status_circuit_breaker() {
nss::ensure_initialized();
nss_as::ensure_initialized();
let config = Config::stable_dev("12345678", "https://foo.bar");
let mut fxa = FirefoxAccount::with_config(config);

Expand Down Expand Up @@ -937,7 +937,7 @@ mod tests {

#[test]
fn test_auth_code_pair_valid_not_allowed_scope() {
nss::ensure_initialized();
nss_as::ensure_initialized();
let config = Config::stable_dev("12345678", "https://foo.bar");
let mut fxa = FirefoxAccount::with_config(config);
fxa.set_session_token("session");
Expand Down Expand Up @@ -991,7 +991,7 @@ mod tests {

#[test]
fn test_auth_code_pair_invalid_scope_not_allowed() {
nss::ensure_initialized();
nss_as::ensure_initialized();
let config = Config::stable_dev("12345678", "https://foo.bar");
let mut fxa = FirefoxAccount::with_config(config);
fxa.set_session_token("session");
Expand Down Expand Up @@ -1042,7 +1042,7 @@ mod tests {

#[test]
fn test_auth_code_pair_scope_not_in_state() {
nss::ensure_initialized();
nss_as::ensure_initialized();
let config = Config::stable_dev("12345678", "https://foo.bar");
let mut fxa = FirefoxAccount::with_config(config);
fxa.set_session_token("session");
Expand Down Expand Up @@ -1090,7 +1090,7 @@ mod tests {

#[test]
fn test_handle_web_channel_login_sets_session_token() {
nss::ensure_initialized();
nss_as::ensure_initialized();
let config = Config::stable_dev("12345678", "https://foo.bar");
let mut fxa = FirefoxAccount::with_config(config);
fxa.handle_web_channel_login(
Expand All @@ -1102,7 +1102,7 @@ mod tests {

#[test]
fn test_oauth_request_sent_with_session_when_available() {
nss::ensure_initialized();
nss_as::ensure_initialized();
let config = Config::new_with_mock_well_known_fxa_client_configuration(
"mock-fxa.example.com",
"12345678",
Expand Down Expand Up @@ -1182,7 +1182,7 @@ mod tests {
// different scopes, the new token is merged with the old scopes and the device is restored.
#[test]
fn test_complete_oauth_flow_merges_scopes_and_restores_device() {
nss::ensure_initialized();
nss_as::ensure_initialized();
let config = Config::new_with_mock_well_known_fxa_client_configuration(
"mock-fxa.example.com",
"12345678",
Expand Down Expand Up @@ -1293,7 +1293,7 @@ mod tests {
// the device is restored.
#[test]
fn test_complete_oauth_flow_no_merge_when_scopes_match() {
nss::ensure_initialized();
nss_as::ensure_initialized();
let config = Config::new_with_mock_well_known_fxa_client_configuration(
"mock-fxa.example.com",
"12345678",
Expand Down
Loading
Loading