Skip to content

Commit

Permalink
Upgrade to ring 0.17. (#233)
Browse files Browse the repository at this point in the history
  • Loading branch information
partim authored Oct 18, 2023
1 parent 3db82d1 commit 454d29f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ name = "domain"
path = "src/lib.rs"

[dependencies]
octseq = { git = "https://github.com/NLnetLabs/octseq.git" }
octseq = "0.3"
time = "0.3.1"

rand = { version = "0.8", optional = true }
Expand All @@ -26,7 +26,7 @@ chrono = { version = "0.4.6", optional = true, default-features = false
futures = { version = "0.3", optional = true }
heapless = { version = "0.7", optional = true }
#openssl = { version = "0.10", optional = true }
ring = { version = "0.16.14", optional = true }
ring = { version = "0.17", optional = true }
serde = { version = "1.0.130", optional = true, features = ["derive"] }
siphasher = { version = "0.3.10", optional = true }
smallvec = { version = "1", optional = true }
Expand Down
3 changes: 2 additions & 1 deletion src/sign/ring.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ impl<'a> Key<'a> {
let keypair = EcdsaKeyPair::from_pkcs8(
&ECDSA_P256_SHA256_FIXED_SIGNING,
pkcs8.as_ref(),
rng,
)?;
let public_key = keypair.public_key().as_ref()[1..].into();
Ok(Key {
Expand Down Expand Up @@ -94,7 +95,7 @@ impl<'a> SigningKey for Key<'a> {
}
RingKey::Ed25519(ref key) => Ok(Signature::sig(key.sign(msg))),
RingKey::Rsa(ref key, encoding) => {
let mut sig = vec![0; key.public_modulus_len()];
let mut sig = vec![0; key.public().modulus_len()];
key.sign(encoding, self.rng, msg, &mut sig)?;
Ok(Signature::vec(sig))
}
Expand Down

0 comments on commit 454d29f

Please sign in to comment.