Skip to content

Commit

Permalink
Refactor RRSIGRdata to use base64 encoding for the signature
Browse files Browse the repository at this point in the history
  • Loading branch information
joalopez1206 committed Sep 10, 2024
1 parent 915cce1 commit 53dd09b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/message/rdata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<u8> = 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,
Expand Down Expand Up @@ -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());
}
_ => {}
}
Expand Down

0 comments on commit 53dd09b

Please sign in to comment.