Skip to content

Commit 12e14d7

Browse files
committed
Merge branch 'main' into blobs-1g-test
2 parents 8b552a3 + 57340cc commit 12e14d7

File tree

6 files changed

+17
-366
lines changed

6 files changed

+17
-366
lines changed

Cargo.lock

Lines changed: 6 additions & 29 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,6 @@ quinn = { package = "iroh-quinn", version = "0.12", features = ["ring"] }
5858
rand = "0.8"
5959
range-collections = "0.4.0"
6060
redb = { version = "2.2.0", optional = true }
61-
redb_v1 = { package = "redb", version = "1.5.1", optional = true }
62-
ref-cast = { version = "1.0.23", optional = true }
6361
reflink-copy = { version = "0.1.8", optional = true }
6462
self_cell = "1.0.1"
6563
serde = { version = "1", features = ["derive"] }
@@ -88,7 +86,7 @@ serde_test = "1.0.176"
8886
testresult = "0.4.0"
8987
tokio = { version = "1", features = ["macros", "test-util"] }
9088
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
91-
rcgen = "0.12"
89+
rcgen = "0.13"
9290
rustls = { version = "0.23", default-features = false, features = ["ring"] }
9391
tempfile = "3.10.0"
9492
futures-util = "0.3.30"
@@ -98,7 +96,7 @@ testdir = "0.9.1"
9896
default = ["fs-store", "net_protocol"]
9997
downloader = ["dep:parking_lot", "tokio-util/time", "dep:hashlink"]
10098
net_protocol = ["downloader", "dep:futures-util"]
101-
fs-store = ["dep:reflink-copy", "redb", "dep:redb_v1", "dep:tempfile"]
99+
fs-store = ["dep:reflink-copy", "redb", "dep:tempfile"]
102100
metrics = ["iroh-metrics/metrics"]
103101
redb = ["dep:redb"]
104102
cli = ["rpc", "dep:clap", "dep:indicatif", "dep:console"]
@@ -108,7 +106,6 @@ rpc = [
108106
"dep:nested_enum_utils",
109107
"dep:strum",
110108
"dep:futures-util",
111-
"dep:ref-cast",
112109
"dep:portable-atomic",
113110
"dep:walkdir",
114111
"downloader",

deny.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ license-files = [
3434
ignore = [
3535
"RUSTSEC-2024-0370", # unmaintained, no upgrade available
3636
"RUSTSEC-2024-0384", # unmaintained, no upgrade available
37+
"RUSTSEC-2024-0421", # we store dns packets by key, and don't do anything else with them. Todo: remove
3738
]
3839

3940
[sources]

examples/connect/mod.rs

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ use std::{path::PathBuf, sync::Arc};
33

44
use anyhow::{bail, Context, Result};
55
use quinn::crypto::rustls::{QuicClientConfig, QuicServerConfig};
6+
use rustls::pki_types::{CertificateDer, PrivatePkcs8KeyDer};
67
use tokio::fs;
78

89
pub const EXAMPLE_ALPN: &[u8] = b"n0/iroh/examples/bytes/0";
@@ -40,22 +41,19 @@ pub async fn make_and_write_certs() -> Result<(
4041
let key_path = path.join("key.der");
4142
let cert_path = path.join("cert.der");
4243

43-
let key = cert.serialize_private_key_der();
44-
let cert = cert.serialize_der().unwrap();
44+
let key = PrivatePkcs8KeyDer::from(cert.key_pair.serialize_der());
45+
let cert: CertificateDer = cert.cert.into();
4546
tokio::fs::create_dir_all(path)
4647
.await
4748
.context("failed to create certificate directory")?;
4849
tokio::fs::write(cert_path, &cert)
4950
.await
5051
.context("failed to write certificate")?;
51-
tokio::fs::write(key_path, &key)
52+
tokio::fs::write(key_path, key.secret_pkcs8_der())
5253
.await
5354
.context("failed to write private key")?;
5455

55-
Ok((
56-
rustls::pki_types::PrivateKeyDer::try_from(key).unwrap(),
57-
rustls::pki_types::CertificateDer::from(cert),
58-
))
56+
Ok((rustls::pki_types::PrivateKeyDer::from(key), cert))
5957
}
6058

6159
// derived from `quinn/examples/client.rs`

src/store/fs.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ use smallvec::SmallVec;
8787
use tokio::io::AsyncWriteExt;
8888
use tracing::trace_span;
8989

90-
mod migrate_redb_v1_v2;
9190
mod tables;
9291
#[doc(hidden)]
9392
pub mod test_support;
@@ -1510,7 +1509,9 @@ impl Actor {
15101509
let db = match redb::Database::create(path) {
15111510
Ok(db) => db,
15121511
Err(DatabaseError::UpgradeRequired(1)) => {
1513-
migrate_redb_v1_v2::run(path).map_err(ActorError::Migration)?
1512+
return Err(ActorError::Migration(anyhow::anyhow!(
1513+
"migration from v1 no longer supported"
1514+
)))
15141515
}
15151516
Err(err) => return Err(err.into()),
15161517
};

0 commit comments

Comments
 (0)