Skip to content

Commit 5e5d2e7

Browse files
Revert is_multiple_of() - unstable feature
The is_multiple_of() method is unstable in Rust 1.83. Reverting to modulo check for stable compatibility.
1 parent 3e24463 commit 5e5d2e7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • crates/rust-hsm-core/src/pkcs11/keys

crates/rust-hsm-core/src/pkcs11/keys/csr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ fn sign_tbs(
428428
/// Convert raw ECDSA signature (r || s) to DER-encoded SEQUENCE { r INTEGER, s INTEGER }
429429
fn encode_ecdsa_signature(raw_sig: &[u8]) -> anyhow::Result<Vec<u8>> {
430430
// Split raw signature into r and s components (equal length)
431-
if !raw_sig.len().is_multiple_of(2) {
431+
if raw_sig.len() % 2 != 0 {
432432
anyhow::bail!("Invalid ECDSA signature length: {}", raw_sig.len());
433433
}
434434

0 commit comments

Comments
 (0)