Skip to content

Commit 9081890

Browse files
build(deps): get rid of num-bigint-dig (#425)
1 parent d96e761 commit 9081890

File tree

6 files changed

+79
-141
lines changed

6 files changed

+79
-141
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ffi/wasm/Cargo.lock

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

picky-asn1-x509/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,19 @@ picky-asn1-der = { version = "0.5", path = "../picky-asn1-der" }
2222
serde = { version = "1", features = ["derive"] }
2323
oid = { version = "0.2", features = ["serde_support"] }
2424
base64 = "0.22"
25-
num-bigint-dig = { version = "0.8", optional = true }
25+
crypto-bigint = { version = "=0.7.0-rc.8", optional = true, features = ["alloc"], default-features = false }
2626
widestring = { version = "1.1", default-features = false, features = ["alloc"], optional = true }
2727
zeroize = { version = "1.8", optional = true }
2828

2929
[dev-dependencies]
30-
num-bigint-dig = "0.8"
30+
crypto-bigint = { version = "=0.7.0-rc.8", features = ["alloc"], default-features = false }
3131
pretty_assertions = "1.4"
3232
hex = "0.4"
3333
expect-test = "1"
3434
picky-test-data = { path = "../picky-test-data", version = "0.1" }
3535

3636
[features]
37-
legacy = ["num-bigint-dig"]
37+
legacy = ["crypto-bigint"]
3838
pkcs7 = ["widestring"]
3939
pkcs12 = []
4040
ctl = ["pkcs7"]

picky-asn1-x509/src/certificate.rs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ mod tests {
163163
use crate::{DirectoryName, Extension, KeyIdentifier, KeyUsage};
164164
use base64::Engine as _;
165165
use base64::engine::general_purpose;
166-
use num_bigint_dig::BigInt;
166+
use crypto_bigint::BoxedUint;
167167
use picky_asn1::bit_string::BitString;
168168
use picky_asn1::date::UTCTime;
169169

@@ -218,7 +218,10 @@ mod tests {
218218

219219
let subject_public_key_info = SubjectPublicKeyInfo::new_rsa_key(
220220
IntegerAsn1::from(encoded[165..422].to_vec()),
221-
BigInt::from(65537).to_signed_bytes_be().into(),
221+
BoxedUint::from(65537u32)
222+
.to_be_bytes_trimmed_vartime()
223+
.into_vec()
224+
.into(),
222225
);
223226
check_serde!(subject_public_key_info: SubjectPublicKeyInfo in encoded[133..427]);
224227

@@ -245,7 +248,10 @@ mod tests {
245248

246249
let tbs_certificate = TbsCertificate {
247250
version: ExplicitContextTag0(Version::V3),
248-
serial_number: BigInt::from(935548868).to_signed_bytes_be().into(),
251+
serial_number: BoxedUint::from(935548868u32)
252+
.to_be_bytes_trimmed_vartime()
253+
.into_vec()
254+
.into(),
249255
signature: signature_algorithm.clone(),
250256
issuer,
251257
validity,

0 commit comments

Comments
 (0)