Skip to content

Commit

Permalink
Update rust version (#303)
Browse files Browse the repository at this point in the history
* Update rust version

* Make clippy happy
  • Loading branch information
skeet70 authored Oct 30, 2023
1 parent c6c0bbe commit 3886c3f
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 29 deletions.
66 changes: 51 additions & 15 deletions flake.lock

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

2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[toolchain]
profile = "default"
channel = "1.67.1"
channel = "1.73.0"
4 changes: 2 additions & 2 deletions src/internal/document_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -730,9 +730,9 @@ where
})
.map_err(|x| match x {
IronOxideErr::RequestError {
http_status: Some(code),
http_status: Some(404),
..
} if code == 404 => IronOxideErr::PolicyDoesNotExist,
} => IronOxideErr::PolicyDoesNotExist,
e => e,
})
}
Expand Down
13 changes: 3 additions & 10 deletions src/internal/user_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -521,11 +521,8 @@ pub async fn user_rotate_private_key<CR: rand::CryptoRng + rand::RngCore>(
.into();

let (new_priv_key, aug_factor) = augment_private_key_with_retry(recrypt, &priv_key)?;
let new_encrypted_priv_key = aes::encrypt_user_master_key(
&Mutex::new(OsRng::default()),
&password.0,
new_priv_key.as_bytes(),
)?;
let new_encrypted_priv_key =
aes::encrypt_user_master_key(&Mutex::new(OsRng), &password.0, new_priv_key.as_bytes())?;
(
curr_user_id,
current_key_id,
Expand Down Expand Up @@ -833,11 +830,7 @@ pub async fn user_change_password(
)?
.into();

aes::encrypt_user_master_key(
&Mutex::new(OsRng::default()),
&new_password.0,
priv_key.as_bytes(),
)?
aes::encrypt_user_master_key(&Mutex::new(OsRng), &new_password.0, priv_key.as_bytes())?
};
requests::user_update::user_update(auth, &curr_user_id, Some(new_encrypted_priv_key.into()))
.await?
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ impl IronOxide {
rng: Mutex::new(ReseedingRng::new(
rand_chacha::ChaChaCore::from_entropy(),
BYTES_BEFORE_RESEEDING,
OsRng::default(),
OsRng,
)),
policy_eval_cache: DashMap::new(),
}
Expand Down

0 comments on commit 3886c3f

Please sign in to comment.