Skip to content

Commit 88829bd

Browse files
committed
Merge remote-tracking branch 'origin/main' into bump_rust_ipfs
2 parents b18033c + 48faa69 commit 88829bd

File tree

161 files changed

+886
-792
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

161 files changed

+886
-792
lines changed

integration_tests/rust/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
[workspace]
2-
resolver = "2"
2+
resolver = "3"
33
members = ["overhead_benchmark"]
44

55
[workspace.package]
6-
edition = "2021"
6+
edition = "2024"
77

88
[workspace.lints.rust]
99
warnings = "deny"

rust/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[workspace]
2-
resolver = "2"
2+
resolver = "3"
33
members = [
44
"c509-certificate",
55
"cardano-blockchain-types",
@@ -21,7 +21,7 @@ members = [
2121
]
2222

2323
[workspace.package]
24-
edition = "2021"
24+
edition = "2024"
2525
authors = ["Steven Johnson <[email protected]>"]
2626
homepage = "https://github.com/input-output-hk/catalyst-libs"
2727
repository = "https://github.com/input-output-hk/catalyst-libs"

rust/Earthfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
VERSION 0.8
22

3-
IMPORT github.com/input-output-hk/catalyst-ci/earthly/rust:v3.5.27 AS rust-ci
3+
IMPORT github.com/input-output-hk/catalyst-ci/earthly/rust:v3.5.29 AS rust-ci
44
IMPORT ../ AS repo-ci
55

66
COPY_SRC:

rust/c509-certificate/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ ignored = ["strum"]
4242
[dev-dependencies]
4343
clap = { version = "4.5.23", features = ["derive"] }
4444
serde_json = "1.0.134"
45-
rand = "0.8.5"
45+
rand = "0.9.0"
4646
chrono = "0.4.39"
4747

4848
[[example]]

rust/c509-certificate/Earthfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
VERSION 0.8
22

3-
IMPORT github.com/input-output-hk/catalyst-ci/earthly/rust::v3.5.27 AS rust-ci
3+
IMPORT github.com/input-output-hk/catalyst-ci/earthly/rust::v3.5.29 AS rust-ci
44

55
IMPORT .. AS rust-local
66
IMPORT ../.. AS repo

rust/c509-certificate/examples/cli/main.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use std::{
66
path::PathBuf,
77
};
88

9-
use asn1_rs::{oid, Oid};
9+
use asn1_rs::{Oid, oid};
1010
use c509_certificate::{
1111
attributes::attribute::Attribute,
1212
big_uint::UnwrappedBigUint,
@@ -131,7 +131,7 @@ struct C509Json {
131131
}
132132

133133
/// Ed25519 oid and parameter - default algorithm.
134-
const ED25519: (Oid, Option<String>) = (oid!(1.3.101 .112), None);
134+
const ED25519: (Oid, Option<String>) = (oid!(1.3.101.112), None);
135135

136136
/// Integer indicate that certificate is self-signed.
137137
/// 2 for Natively Signed C509 Certificate following X.509 v3
@@ -288,7 +288,7 @@ fn parse_or_default_date(
288288

289289
/// Generate random serial number if not provided
290290
fn parse_serial_number(serial_number: Option<UnwrappedBigUint>) -> UnwrappedBigUint {
291-
let random_number: u64 = rand::thread_rng().gen();
291+
let random_number: u64 = rand::rng().random();
292292
serial_number.unwrap_or(UnwrappedBigUint::new(random_number))
293293
}
294294

rust/c509-certificate/src/algorithm_identifier.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
//! visit [C509 Certificate](https://datatracker.ietf.org/doc/draft-ietf-cose-cbor-encoded-cert/11/)
1515
1616
use asn1_rs::Oid;
17-
use minicbor::{encode::Write, Decode, Decoder, Encode, Encoder};
17+
use minicbor::{Decode, Decoder, Encode, Encoder, encode::Write};
1818
use serde::{Deserialize, Serialize};
1919

2020
use crate::{

rust/c509-certificate/src/attributes/attribute.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@
1818
use std::str::FromStr;
1919

2020
use asn1_rs::Oid;
21-
use minicbor::{encode::Write, Decode, Decoder, Encode, Encoder};
21+
use minicbor::{Decode, Decoder, Encode, Encoder, encode::Write};
2222
use serde::{Deserialize, Deserializer, Serialize};
2323

24-
use super::data::{get_oid_from_int, ATTRIBUTES_LOOKUP};
24+
use super::data::{ATTRIBUTES_LOOKUP, get_oid_from_int};
2525
use crate::{
2626
helper::{
2727
decode::{decode_array_len, decode_datatype, decode_helper},
@@ -259,7 +259,7 @@ mod test_attribute {
259259
fn encode_decode_attribute_int() {
260260
let mut buffer = Vec::new();
261261
let mut encoder = Encoder::new(&mut buffer);
262-
let mut attribute = Attribute::new(oid!(1.2.840 .113549 .1 .9 .1));
262+
let mut attribute = Attribute::new(oid!(1.2.840.113549.1.9.1));
263263
attribute.add_value(AttributeValue::Text("[email protected]".to_string()));
264264
attribute
265265
.encode(&mut encoder, &mut ())
@@ -281,7 +281,7 @@ mod test_attribute {
281281
fn empty_attribute_value() {
282282
let mut buffer = Vec::new();
283283
let mut encoder = Encoder::new(&mut buffer);
284-
let attribute = Attribute::new(oid!(1.2.840 .113549 .1 .9 .1));
284+
let attribute = Attribute::new(oid!(1.2.840.113549.1.9.1));
285285
attribute
286286
.encode(&mut encoder, &mut ())
287287
.expect_err("Failed to encode Attribute");

rust/c509-certificate/src/attributes/data.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
use std::sync::LazyLock;
66

77
use anyhow::Error;
8-
use asn1_rs::{oid, Oid};
8+
use asn1_rs::{Oid, oid};
99

1010
use crate::tables::IntegerToOidTable;
1111

rust/c509-certificate/src/attributes/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
//! visit [C509 Certificate](https://datatracker.ietf.org/doc/draft-ietf-cose-cbor-encoded-cert/11/)
1515
1616
use attribute::Attribute;
17-
use minicbor::{encode::Write, Decode, Decoder, Encode, Encoder};
17+
use minicbor::{Decode, Decoder, Encode, Encoder, encode::Write};
1818
use serde::{Deserialize, Serialize};
1919

2020
use crate::helper::{decode::decode_array_len, encode::encode_array_len};
@@ -113,7 +113,7 @@ mod test_attributes {
113113
fn encode_decode_attributes_int() {
114114
let mut buffer = Vec::new();
115115
let mut encoder = Encoder::new(&mut buffer);
116-
let mut attr = Attribute::new(oid!(1.2.840 .113549 .1 .9 .1));
116+
let mut attr = Attribute::new(oid!(1.2.840.113549.1.9.1));
117117
attr.add_value(AttributeValue::Text("[email protected]".to_string()));
118118
attr.add_value(AttributeValue::Text("[email protected]".to_string()));
119119
let mut attributes = Attributes::new();

0 commit comments

Comments
 (0)