Skip to content

Commit

Permalink
Upgrade dependencies and rust (#497)
Browse files Browse the repository at this point in the history
  • Loading branch information
robklg authored Feb 14, 2024
1 parent e61951f commit edd1b6e
Show file tree
Hide file tree
Showing 9 changed files with 57 additions and 55 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: build

env:
CARGO_TERM_COLOR: always
RUST_VERSION: 1.72.0
RUST_VERSION: 1.76.0

on:
push:
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

### Upcoming

- Compile against Rust 1.76.0
- Upgraded dependencies

### libunftp 0.19.1

_tag: libunftp-0.19.1_
Expand Down
20 changes: 10 additions & 10 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,37 +30,37 @@ members = [
]

[dependencies]
async-trait = "0.1.75"
bitflags = "2.4.1"
async-trait = "0.1.77"
bitflags = "2.4.2"
bytes = "1.5.0"
chrono = { version = "0.4.31", default-features = false, features = ["clock", "std"] }
chrono = { version = "0.4.34", default-features = false, features = ["clock", "std"] }
derive_more = { version = "0.99.17", features = ["display"] }
futures-util = { version = "0.3.29", default-features = false, features = ["alloc", "sink"] }
getrandom = "0.2.11"
futures-util = { version = "0.3.30", default-features = false, features = ["alloc", "sink"] }
getrandom = "0.2.12"
lazy_static = "1.4.0"
md-5 = "0.10.6"
moka = { version = "0.11.3", default-features = false, features = ["sync"] }
nix = { version = "0.26.2", default-features = false, features = ["fs"] }
nix = { version = "0.26.4", default-features = false, features = ["fs"] }
prometheus = { version = "0.13.3", default-features = false }
proxy-protocol = "0.5.0"
rustls = "0.21.10"
rustls-pemfile = "1.0.4"
slog = { version = "2.7.0", features = ["max_level_trace", "release_max_level_info"] }
slog-stdlog = "4.1.1"
thiserror = "1.0.51"
tokio = { version = "1.35.1", features = ["macros", "rt", "net", "process", "sync", "io-util", "time"] }
thiserror = "1.0.57"
tokio = { version = "1.36.0", features = ["macros", "rt", "net", "process", "sync", "io-util", "time"] }
tokio-rustls = "0.24.1"
tokio-util = { version = "0.7.10", features = ["codec"] }
tracing = { version = "0.1.40", default-features = false }
tracing-attributes = "0.1.27"
uuid = { version = "1.6.1", features = ["v4"] }
uuid = { version = "1.7.0", features = ["v4"] }
x509-parser = "0.14.0"
dashmap = "5.5.3"
libc = "0.2"

[dev-dependencies]
pretty_assertions = "1.4.0"
tokio = { version = "1.35.1", features = ["macros", "rt-multi-thread"] }
tokio = { version = "1.36.0", features = ["macros", "rt-multi-thread"] }
unftp-sbe-fs = { path = "../libunftp/crates/unftp-sbe-fs"}


Expand Down
12 changes: 6 additions & 6 deletions crates/unftp-auth-jsonfile/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,22 @@ repository = "https://github.com/bolcom/libunftp/tree/master/crates/unftp-auth-j
readme = "README.md"

[dependencies]
async-trait = "0.1.75"
base64 = "0.21.5"
async-trait = "0.1.77"
base64 = "0.21.7"
bytes = "1.5.0"
ipnet = "2.9.0"
iprange = "0.6.7"
libunftp = { version="0.19.1", path="../../"}
ring = "0.16.20"
serde = { version = "1.0.193", features = ["derive"] }
serde_json = "1.0.108"
tokio = { version = "1.35.1", features = ["rt", "time"] }
serde = { version = "1.0.196", features = ["derive"] }
serde_json = "1.0.113"
tokio = { version = "1.36.0", features = ["rt", "time"] }
tracing = { version = "0.1.40", default-features = false }
tracing-attributes = "0.1.27"
valid = "0.3.1"
flate2 = "1.0.28"

[dev-dependencies]
pretty_env_logger = "0.5.0"
tokio = { version = "1.35.1", features = ["macros"] }
tokio = { version = "1.36.0", features = ["macros"] }
unftp-sbe-fs = { version="0.2.2", path="../unftp-sbe-fs"}
17 changes: 7 additions & 10 deletions crates/unftp-auth-jsonfile/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ use ring::{
};
use serde::Deserialize;
use std::io::prelude::*;
use std::{collections::HashMap, convert::TryInto, fs, num::NonZeroU32, path::Path, time::Duration};
use std::{collections::HashMap, fs, num::NonZeroU32, path::Path, time::Duration};
use tokio::time::sleep;
use valid::{constraint::Length, Validate};

Expand Down Expand Up @@ -283,18 +283,15 @@ impl JsonFileAuthenticator {
pbkdf2_salt: base64::engine::general_purpose::STANDARD
.decode(pbkdf2_salt)
.map_err(|_| "Could not base64 decode the salt")?
.try_into()
.map_err(|_| "Could not convert String to Bytes")?,
pbkdf2_key: base64::engine::general_purpose::STANDARD.decode(pbkdf2_key)
.into(),
pbkdf2_key: base64::engine::general_purpose::STANDARD
.decode(pbkdf2_key)
.map_err(|_| "Could not decode base64")?
.validate("pbkdf2_key", &Length::Max(SHA256_OUTPUT_LEN))
.result()
.map_err(|_| {
format!("Key of user \"{}\" is too long", username)
})?
.unwrap() // this unwrap is just giving the value within
.try_into()
.map_err(|_| "Could not convert to Bytes")?,
.map_err(|_| format!("Key of user \"{}\" is too long", username))?
.unwrap() // Safe to use given Validated's API
.into(),
pbkdf2_iter,
},
client_cert,
Expand Down
4 changes: 2 additions & 2 deletions crates/unftp-auth-pam/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ repository = "https://github.com/bolcom/libunftp/tree/master/crates/unftp-auth-p
readme = "README.md"

[dependencies]
async-trait = "0.1.75"
async-trait = "0.1.77"
libunftp = { version="0.19.1", path="../../"}
tracing = { version = "0.1.40", default-features = false }
tracing-attributes = "0.1.27"
Expand All @@ -28,4 +28,4 @@ tracing-attributes = "0.1.27"
pam-auth = { package = "pam", version = "0.7.0" }

[dev-dependencies]
tokio = { version = "1.35.1", features = ["macros"] }
tokio = { version = "1.36.0", features = ["macros"] }
12 changes: 6 additions & 6 deletions crates/unftp-auth-rest/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,20 @@ repository = "https://github.com/bolcom/libunftp/tree/hannes/crates/unftp-auth-r
readme = "README.md"

[dependencies]
async-trait = "0.1.75"
async-trait = "0.1.77"
hyper = { version = "0.14.28", features = ["client", "runtime", "stream", "http1"] }
hyper-rustls = "0.24.2"
libunftp = { version="0.19.1", path="../../"}
percent-encoding = "2.3.1"
regex = "1.10.2"
serde = { version = "1.0.193", features = ["derive"] }
serde_json = "1.0.108"
tokio = { version = "1.35.1", features = ["rt", "net", "sync", "io-util", "time"] }
regex = "1.10.3"
serde = { version = "1.0.196", features = ["derive"] }
serde_json = "1.0.113"
tokio = { version = "1.36.0", features = ["rt", "net", "sync", "io-util", "time"] }
tracing = { version = "0.1.40", default-features = false }
tracing-attributes = "0.1.27"


[dev-dependencies]
pretty_env_logger = "0.5.0"
tokio = { version = "1.35.1", features = ["macros"] }
tokio = { version = "1.36.0", features = ["macros"] }
unftp-sbe-fs = { version="0.2.2", path="../unftp-sbe-fs"}
18 changes: 9 additions & 9 deletions crates/unftp-sbe-fs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,33 +19,33 @@ repository = "https://github.com/bolcom/libunftp/tree/master/crates/unftp-sbe-fs
readme = "README.md"

[dependencies]
async-trait = "0.1.75"
async-trait = "0.1.77"
cfg-if = "1.0"
cap-std = "2.0"
futures = { version = "0.3.29", default-features = false, features = ["std"] }
futures = { version = "0.3.30", default-features = false, features = ["std"] }
lazy_static = "1.4.0"
libunftp = { version="0.19.1", path="../../"}
path_abs = "0.5.1"
tokio = { version = "1.35.1", features = ["rt", "net", "sync", "io-util", "time", "fs"] }
tokio = { version = "1.36.0", features = ["rt", "net", "sync", "io-util", "time", "fs"] }
tokio-stream = "0.1.14"
tracing = { version = "0.1.40", default-features = false }
tracing-attributes = "0.1.27"

[dev-dependencies]
async_ftp = "6.0.0"
async-trait = "0.1.73"
async-trait = "0.1.77"
more-asserts = "0.3.1"
pretty_assertions = "1.4.0"
pretty_env_logger = "0.5.0"
rstest = "0.18.2"
serde = { version = "1.0.188", features = ["derive"] }
serde_json = "1.0.107"
serde = { version = "1.0.196", features = ["derive"] }
serde_json = "1.0.113"
slog-async = "2.8.0"
slog-term = "2.9.0"
tempfile = "3.8.1"
tokio = { version = "1.35.1", features = ["macros", "rt-multi-thread"] }
tempfile = "3.10.0"
tokio = { version = "1.36.0", features = ["macros", "rt-multi-thread"] }
tracing-subscriber = "0.3.18"
getrandom = "0.2.11"
getrandom = "0.2.12"

[target.'cfg(target_os = "freebsd")'.dev-dependencies]
capsicum = { version = "0.3.0", features = ["casper"] }
Expand Down
22 changes: 11 additions & 11 deletions crates/unftp-sbe-gcs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,25 +18,25 @@ repository = "https://github.com/bolcom/libunftp/tree/master/crates/unftp-sbe-gc
readme = "README.md"

[dependencies]
async-trait = "0.1.75"
base64 = "0.21.5"
async-trait = "0.1.77"
base64 = "0.21.7"
bytes = "1.5.0"
chrono = { version = "0.4.31", default-features = false, features = ["std", "serde"] }
futures = { version = "0.3.29", default-features = false, features = ["std"] }
chrono = { version = "0.4.34", default-features = false, features = ["std", "serde"] }
futures = { version = "0.3.30", default-features = false, features = ["std"] }
hyper = { version = "0.14.28", features = ["client", "runtime", "stream", "http1"] }
hyper-rustls = "0.24.2"
libunftp = { version="0.19.1", path="../../"}
mime = "0.3.17"
percent-encoding = "2.3.1"
serde = { version = "1.0.193", features = ["derive"] }
serde_json = "1.0.108"
time = "0.3.31"
tokio = { version = "1.35.1", features = ["rt", "net", "sync", "io-util", "time", "fs"] }
serde = { version = "1.0.196", features = ["derive"] }
serde_json = "1.0.113"
time = "0.3.34"
tokio = { version = "1.36.0", features = ["rt", "net", "sync", "io-util", "time", "fs"] }
tokio-stream = "0.1.14"
tokio-util = { version = "0.7.10", features = ["codec", "compat"] }
tracing = { version = "0.1.40", default-features = false }
tracing-attributes = "0.1.27"
yup-oauth2 = "8.3.1"
yup-oauth2 = "8.3.2"

[dev-dependencies]
async_ftp = "6.0.0"
Expand All @@ -50,6 +50,6 @@ slog = { version = "2.7.0", features = ["max_level_trace", "release_max_level_in
slog-async = "2.8.0"
slog-stdlog = "4.1.1"
slog-term = "2.9.0"
tempfile = "3.8.1"
tokio = { version = "1.35.1", features = ["macros", "rt-multi-thread"] }
tempfile = "3.10.0"
tokio = { version = "1.36.0", features = ["macros", "rt-multi-thread"] }
tracing-subscriber = "0.3.18"

0 comments on commit edd1b6e

Please sign in to comment.