chore: update deps
This commit is contained in:
parent
fb60987468
commit
93e8a33c0e
512
Cargo.lock
generated
512
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@ -20,7 +20,7 @@ ring = "0.13.5"
|
||||
failure = "0.1.5"
|
||||
rpassword = "4.0.1"
|
||||
structopt = "0.3.2"
|
||||
libcryptsetup-rs = "0.4.2"
|
||||
libcryptsetup-rs = "0.9.1"
|
||||
serde_json = "1.0.51"
|
||||
serde_derive = "1.0.116"
|
||||
serde = "1.0.116"
|
||||
@ -31,7 +31,7 @@ hex = "0.3.2"
|
||||
ring = "0.13.5"
|
||||
failure = "0.1.5"
|
||||
rpassword = "4.0.1"
|
||||
libcryptsetup-rs = "0.4.1"
|
||||
libcryptsetup-rs = "0.9.1"
|
||||
structopt = "0.3.2"
|
||||
|
||||
[profile.release]
|
||||
|
38
flake.lock
generated
38
flake.lock
generated
@ -7,11 +7,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1639051343,
|
||||
"narHash": "sha256-62qARP+5Q0GmudcpuQHJP3/yXIgmUVoHR4orD/+FAC4=",
|
||||
"lastModified": 1698420672,
|
||||
"narHash": "sha256-/TdeHMPRjjdJub7p7+w55vyABrsJlt5QkznPYy55vKA=",
|
||||
"owner": "nmattia",
|
||||
"repo": "naersk",
|
||||
"rev": "ebde51ec0eec82dc71eaca03bc24cf8eb44a3d74",
|
||||
"rev": "aeb58d5e8faead8980a807c840232697982d47b9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -22,11 +22,11 @@
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1638109994,
|
||||
"narHash": "sha256-OpA37PTiPMIqoRJbufbl5rOLII7HeeGcA0yl7FoyCIE=",
|
||||
"lastModified": 1701253981,
|
||||
"narHash": "sha256-ztaDIyZ7HrTAfEEUt9AtTDNoCYxUdSd6NrRHaYOIxtk=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "a284564b7f75ac4db73607db02076e8da9d42c9d",
|
||||
"rev": "e92039b55bcd58469325ded85d4f58dd5a4eaf58",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -41,13 +41,31 @@
|
||||
"utils": "utils"
|
||||
}
|
||||
},
|
||||
"utils": {
|
||||
"systems": {
|
||||
"locked": {
|
||||
"lastModified": 1638122382,
|
||||
"narHash": "sha256-sQzZzAbvKEqN9s0bzWuYmRaA03v40gaJ4+iL1LXjaeI=",
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"utils": {
|
||||
"inputs": {
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1701680307,
|
||||
"narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "74f7e4319258e287b0f9cb95426c9853b282730b",
|
||||
"rev": "4022d587cbbfd70fe950c1e2083a02621806a725",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -16,9 +16,9 @@
|
||||
forPkgs = pkgs:
|
||||
let
|
||||
naersk-lib = naersk.lib."${pkgs.system}";
|
||||
buildInputs = with pkgs; [ cryptsetup ];
|
||||
LIBCLANG_PATH = "${pkgs.clang.cc.lib}/lib";
|
||||
buildInputs = with pkgs; [ cryptsetup cryptsetup.dev ];
|
||||
nativeBuildInputs = with pkgs; [
|
||||
rustPlatform.bindgenHook
|
||||
pkg-config
|
||||
clang
|
||||
];
|
||||
@ -26,7 +26,7 @@
|
||||
rec {
|
||||
# `nix build`
|
||||
packages.${pname} = naersk-lib.buildPackage {
|
||||
inherit pname root buildInputs nativeBuildInputs LIBCLANG_PATH;
|
||||
inherit pname root buildInputs nativeBuildInputs;
|
||||
};
|
||||
defaultPackage = packages.${pname};
|
||||
|
||||
@ -51,7 +51,7 @@
|
||||
# `nix develop`
|
||||
devShell = pkgs.mkShell {
|
||||
nativeBuildInputs = with pkgs; [ rustc cargo rustfmt nixpkgs-fmt ] ++ nativeBuildInputs;
|
||||
inherit buildInputs LIBCLANG_PATH;
|
||||
inherit buildInputs;
|
||||
};
|
||||
};
|
||||
forSystem = system: forPkgs nixpkgs.legacyPackages."${system}";
|
||||
|
13
src/luks.rs
13
src/luks.rs
@ -1,9 +1,8 @@
|
||||
use crate::error::*;
|
||||
|
||||
use libcryptsetup_rs::{
|
||||
CryptActivateFlag, CryptActivateFlags, CryptDevice, CryptInit, CryptTokenInfo,
|
||||
EncryptionFormat, KeyslotInfo, TokenInput,
|
||||
};
|
||||
use libcryptsetup_rs::consts::flags::CryptActivate;
|
||||
use libcryptsetup_rs::consts::vals::{EncryptionFormat, KeyslotInfo};
|
||||
use libcryptsetup_rs::{CryptDevice, CryptInit, CryptTokenInfo, TokenInput};
|
||||
use std::collections::{HashMap, HashSet};
|
||||
use std::path::Path;
|
||||
|
||||
@ -204,7 +203,7 @@ impl LuksDevice {
|
||||
None,
|
||||
None,
|
||||
old_secret,
|
||||
CryptActivateFlags::empty(),
|
||||
CryptActivate::empty(),
|
||||
)?;
|
||||
|
||||
// slot should stay the same but better be safe than sorry
|
||||
@ -240,9 +239,9 @@ impl LuksDevice {
|
||||
dry_run: bool,
|
||||
allow_discard: bool,
|
||||
) -> Fido2LuksResult<u32> {
|
||||
let mut flags = CryptActivateFlags::empty();
|
||||
let mut flags = CryptActivate::empty();
|
||||
if allow_discard {
|
||||
flags = CryptActivateFlags::new(vec![CryptActivateFlag::AllowDiscards]);
|
||||
flags = flags | CryptActivate::ALLOW_DISCARDS;
|
||||
}
|
||||
self.device
|
||||
.activate_handle()
|
||||
|
Loading…
x
Reference in New Issue
Block a user