From 1161d34194251dacfde2f1b2bb6371a8cbfa15ef Mon Sep 17 00:00:00 2001 From: Xander Bil Date: Wed, 19 Jun 2024 22:35:44 +0200 Subject: [PATCH] fix dnskey modulus --- src/handlers/update/pubkeys/rsa.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/handlers/update/pubkeys/rsa.rs b/src/handlers/update/pubkeys/rsa.rs index d765511..02911e1 100644 --- a/src/handlers/update/pubkeys/rsa.rs +++ b/src/handlers/update/pubkeys/rsa.rs @@ -51,7 +51,8 @@ impl PublicKey for RsaPublicKey { let mut reader = Reader::new(key); let e_len = reader.read_u8()?; let e = reader.read(e_len as usize)?; - let n = reader.read(reader.unread_bytes())?; + let mut n = reader.read(reader.unread_bytes())?; + n.insert(0, 0); Ok(RsaPublicKey { e, n }) } }