+ fn matcorallo_dnskey() -> (Vec<DnsKey>, Vec<RR>) {
+ let com_dnskeys = com_dnskey().0;
+ let mut matcorallo_ds = vec![DS {
+ name: "matcorallo.com.".try_into().unwrap(), key_tag: 24930, alg: 13, digest_type: 2,
+ digest: Vec::from_hex("693E990CBB1CE1095E387092D3C04BCE907C008891F32A88D41D3ECB129E5E23").unwrap(),
+ }];
+ let ds_rrsig = RRSig {
+ name: "matcorallo.com.".try_into().unwrap(), ty: DS::TYPE, alg: 13, labels: 2, orig_ttl: 86400,
+ expiration: 1707628636, inception: 1707019636, key_tag: 4534, key_name: "com.".try_into().unwrap(),
+ signature: base64::decode("l9b+DhtnJSIzR6y4Bwx+0L9kep77UNCBoTg74RTSL6oMrQd8w4OobHxzwDyXqnLfyxVP18V+AnQp4DdJ2nUW1g==").unwrap(),
+ };
+ verify_rrsig(&ds_rrsig, &com_dnskeys, matcorallo_ds.iter().collect()).unwrap();
+ let dnskeys = vec![DnsKey {
+ name: "matcorallo.com.".try_into().unwrap(), flags: 257, protocol: 3, alg: 13,
+ pubkey: base64::decode("pfO3ow3SrKhLS7AMEi3b5W9P28nCOB9vryxfSXhqMcXFP1x9V4xAt0/JLr0zNodsqRD/8d9Yhu4Wf3hnSlaavw==").unwrap(),
+ }, DnsKey {
+ name: "matcorallo.com.".try_into().unwrap(), flags: 256, protocol: 3, alg: 13,
+ pubkey: base64::decode("OO6LQTV1mnRsFgn6YQoyeo/SDqS3eajfVv8WGQVnuSYO/bTS9St1tJiox2fgU6wRWDU3chhjz1Pj0unKUAQKig==").unwrap(),
+ }];
+ let dnskey_rrsig = RRSig {
+ name: "matcorallo.com.".try_into().unwrap(), ty: DnsKey::TYPE, alg: 13, labels: 2, orig_ttl: 604800,
+ expiration: 1708309135, inception: 1707094135, key_tag: 24930, key_name: "matcorallo.com.".try_into().unwrap(),
+ signature: base64::decode("2MKg3bTn9zf4ThwCoKRFadqD6l1D6SuLksRieKxFC0QQnzUOCRgZSK2/IlT0DMEoM0+mGrJZo7UG79UILMGUyg==").unwrap(),
+ };
+ verify_dnskey_rrsig(&dnskey_rrsig, &matcorallo_ds, dnskeys.iter().collect()).unwrap();
+ let rrs = vec![matcorallo_ds.pop().unwrap().into(), ds_rrsig.into(),
+ dnskeys[0].clone().into(), dnskeys[1].clone().into(), dnskey_rrsig.into()];
+ (dnskeys, rrs)
+ }
+
+ fn matcorallo_txt_record() -> (Txt, RRSig) {
+ let txt_resp = Txt {
+ name: "txt_test.matcorallo.com.".try_into().unwrap(),
+ data: "dnssec_prover_test".to_owned().into_bytes(),
+ };
+ let txt_rrsig = RRSig {
+ name: "txt_test.matcorallo.com.".try_into().unwrap(),
+ ty: Txt::TYPE, alg: 13, labels: 3, orig_ttl: 30, expiration: 1708319203,
+ inception: 1707104203, key_tag: 34530, key_name: "matcorallo.com.".try_into().unwrap(),
+ signature: base64::decode("4vaE5Jex2VvIT39JpuMNT7Ds7O0OfzTik5f8WcRRxO0IJnGAO16syAsNUkNkNqsMYknnjHDF0lI4agszgzdpsw==").unwrap(),
+ };
+ (txt_resp, txt_rrsig)
+ }
+
+ fn matcorallo_cname_record() -> (CName, RRSig) {
+ let cname_resp = CName {
+ name: "cname_test.matcorallo.com.".try_into().unwrap(),
+ canonical_name: "txt_test.matcorallo.com.".try_into().unwrap(),
+ };
+ let cname_rrsig = RRSig {
+ name: "cname_test.matcorallo.com.".try_into().unwrap(),
+ ty: CName::TYPE, alg: 13, labels: 3, orig_ttl: 30, expiration: 1708319203,
+ inception: 1707104203, key_tag: 34530, key_name: "matcorallo.com.".try_into().unwrap(),
+ signature: base64::decode("5HIrmEotbVb95umE6SX3NrPboKsthdcY8b7DdaYQZzm0Nj5m2VgcfOmEPJYS8o1xE4GvGGF4sdfSy3Uw7TibBg==").unwrap(),
+ };
+ (cname_resp, cname_rrsig)
+ }
+
+ fn matcorallo_wildcard_record() -> (Txt, RRSig) {
+ let txt_resp = Txt {
+ name: "test.wildcard_test.matcorallo.com.".try_into().unwrap(),
+ data: "wildcard_test".to_owned().into_bytes(),
+ };
+ let txt_rrsig = RRSig {
+ name: "test.wildcard_test.matcorallo.com.".try_into().unwrap(),
+ ty: Txt::TYPE, alg: 13, labels: 3, orig_ttl: 30, expiration: 1708321778,
+ inception: 1707106778, key_tag: 34530, key_name: "matcorallo.com.".try_into().unwrap(),
+ signature: base64::decode("vdnXunPY4CnbW/BL8VOOR9o33+dqyKA/4h+u5VM7NjB30Shp8L8gL5UwE0k7TKRNgHC8j3TqEPEmNMIHz87Z4Q==").unwrap(),
+ };
+ (txt_resp, txt_rrsig)
+ }
+
+ fn matcorallo_cname_wildcard_record() -> (CName, RRSig, Txt, RRSig) {
+ let cname_resp = CName {
+ name: "test.cname_wildcard_test.matcorallo.com.".try_into().unwrap(),
+ canonical_name: "cname.wildcard_test.matcorallo.com.".try_into().unwrap(),
+ };
+ let txt_resp = Txt {
+ name: "cname.wildcard_test.matcorallo.com.".try_into().unwrap(),
+ data: "wildcard_test".to_owned().into_bytes(),
+ };
+ let cname_rrsig = RRSig {
+ name: "test.cname_wildcard_test.matcorallo.com.".try_into().unwrap(),
+ ty: CName::TYPE, alg: 13, labels: 3, orig_ttl: 30, expiration: 1708322050,
+ inception: 1707107050, key_tag: 34530, key_name: "matcorallo.com.".try_into().unwrap(),
+ signature: base64::decode("JfJuSemF5dtQYxEw6eKL4IRP8BaDt6FtbtdpZ6HjODTDflhKQRhBEbwT7kwceKPAq18q5sWHFV1bMTqE/F3WLw==").unwrap(),
+ };
+ let txt_rrsig = RRSig {
+ name: "cname.wildcard_test.matcorallo.com.".try_into().unwrap(),
+ ty: Txt::TYPE, alg: 13, labels: 3, orig_ttl: 30, expiration: 1708321778,
+ inception: 1707106778, key_tag: 34530, key_name: "matcorallo.com.".try_into().unwrap(),
+ signature: base64::decode("vdnXunPY4CnbW/BL8VOOR9o33+dqyKA/4h+u5VM7NjB30Shp8L8gL5UwE0k7TKRNgHC8j3TqEPEmNMIHz87Z4Q==").unwrap(),
+ };
+ (cname_resp, cname_rrsig, txt_resp, txt_rrsig)
+ }
+