From 53dd09beb3f60459db2983b665d0e8348fa439b2 Mon Sep 17 00:00:00 2001 From: joalopez1206 Date: Tue, 10 Sep 2024 11:29:47 -0300 Subject: [PATCH] Refactor RRSIGRdata to use base64 encoding for the signature --- src/message/rdata.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/message/rdata.rs b/src/message/rdata.rs index f057bd18..d29eba0d 100644 --- a/src/message/rdata.rs +++ b/src/message/rdata.rs @@ -682,7 +682,7 @@ mod resolver_query_tests { rrsig_rdata.set_signature_inception(1630435200); rrsig_rdata.set_key_tag(1234); rrsig_rdata.set_signer_name(DomainName::new_from_str("example.com")); - rrsig_rdata.set_signature(String::from("abcdefg")); + rrsig_rdata.set_signature(b"abcdefg".to_vec()); let expected_bytes:Vec = vec![0, 1, 5, 2, 0, 0, 14, 16, 97, 46, 119, 128, 97, 46, 119, 128, 4, 210, 7, 101, 120, 97, 109, 112, 108, 101, 3, 99, 111, 109, 0, 97, @@ -1053,7 +1053,7 @@ mod resolver_query_tests { assert_eq!(val.get_signature_inception(), 1630435200); assert_eq!(val.get_key_tag(), 1234); assert_eq!(val.get_signer_name().get_name(), "example.com"); - assert_eq!(val.get_signature(), "abcdefg"); + assert_eq!(val.get_signature(), b"abcdefg".to_vec()); } _ => {} }