1
0
Fork 0
mirror of https://codeberg.org/tyy/aspm synced 2024-12-23 01:19:28 -07:00

Update libraries

This commit is contained in:
Tyler Beckman 2024-01-28 15:19:37 -07:00
parent db19e9ad69
commit 620a8632bb
Signed by: Ty
GPG key ID: 2813440C772555A4
3 changed files with 971 additions and 786 deletions

1719
Cargo.lock generated

File diff suppressed because it is too large Load diff

View file

@ -12,25 +12,25 @@ edition = "2021"
members = ["crates/*"] members = ["crates/*"]
[dependencies] [dependencies]
anyhow = "1.0.71" anyhow = "1.0.79"
app_dirs2 = "2.5.5" app_dirs2 = "2.5.5"
clap = { version = "4.3.9", features = ["derive", "unstable-styles", "env"] } clap = { version = "4.4.18", features = ["derive", "unstable-styles", "env"] }
thiserror = "1.0.40" thiserror = "1.0.56"
asp = { path = "crates/asp" } asp = { path = "crates/asp" }
indoc = "2.0.1" indoc = "2.0.4"
anstyle = "1.0.1" anstyle = "1.0.4"
dialoguer = { version = "0.10.4", features = ["password"] } dialoguer = { version = "0.11.0", features = ["password"] }
argon2 = { version = "0.5.0", features = ["std"] } argon2 = { version = "0.5.3", features = ["std"] }
data-encoding = "2.4.0" data-encoding = "2.5.0"
sea-orm = { version = "0.11.3", features = ["sqlx-sqlite", "runtime-tokio-native-tls"] } sea-orm = { version = "0.12.12", features = ["sqlx-sqlite", "runtime-tokio-native-tls"] }
sea-orm-migration = "0.11.3" sea-orm-migration = "0.12.12"
async-trait = "0.1.68" async-trait = "0.1.77"
tokio = "1.29.1" tokio = "1.35.1"
clap-stdin = "0.2.0" clap-stdin = "0.4.0"
gpgme = { version = "0.11.0", optional = true } gpgme = { version = "0.11.0", optional = true }
pgp = { version = "0.10.2", optional = true } pgp = { version = "0.10.2", optional = true }
josekit = { version = "0.8.3", optional = true } josekit = { version = "0.8.5", optional = true }
elliptic-curve = { version = "0.13.5", optional = true } elliptic-curve = { version = "0.13.8", optional = true }
[features] [features]
gpg-compat = ["dep:gpgme", "dep:pgp", "dep:josekit", "dep:elliptic-curve"] gpg-compat = ["dep:gpgme", "dep:pgp", "dep:josekit", "dep:elliptic-curve"]

View file

@ -1,3 +1,5 @@
use std::io::Read;
use anyhow::{anyhow, bail, Context}; use anyhow::{anyhow, bail, Context};
use argon2::{password_hash::SaltString, Argon2, PasswordHasher}; use argon2::{password_hash::SaltString, Argon2, PasswordHasher};
use asp::keys::{AspKey, AspKeyError}; use asp::keys::{AspKey, AspKeyError};
@ -52,7 +54,11 @@ impl AspmSubcommand for KeysImportJwkCommand {
})?; })?;
let key = match AspKey::from_jwk( let key = match AspKey::from_jwk(
Jwk::from_bytes(self.key.as_bytes()).context("Unable to parse provided JWK")?, Jwk::from_bytes({
let mut buf = Vec::new();
self.key.into_reader()?.read_to_end(&mut buf)?;
buf
}).context("Unable to parse provided JWK")?,
) )
.context("Unable to convert parsed JWK to an AspKey") .context("Unable to convert parsed JWK to an AspKey")
{ {