Exemplo n.º 1
0
 public void DnsResourceDataNextDomainSecure3ParseWrongLengthTest()
 {
     var resourceData = new DnsResourceDataNextDomainSecure3(DnsSecNSec3HashAlgorithm.Sha1, DnsSecNSec3Flags.None, 0, new DataSegment(new byte[5]),
                                                             new DataSegment(new byte[5]), new[] {DnsType.A, DnsType.A6,});
     TestResourceRecordIsNotCreatedWithNewLength(DnsType.NSec3, resourceData, 1);
     TestResourceRecordIsNotCreatedWithNewLength(DnsType.NSec3, resourceData, -8);
     TestResourceRecordIsNotCreatedWithNewLength(DnsType.NSec3, resourceData, -13);
     TestResourceRecordIsNotCreatedWithNewLength(DnsType.NSec3, resourceData, -14);
     TestResourceRecordIsNotCreatedWithNewLength(DnsType.NSec3, resourceData, -19);
 }
Exemplo n.º 2
0
 public void DnsResourceDataNextDomainSecure3SaltTooBigTest()
 {
     var resourceData = new DnsResourceDataNextDomainSecure3(DnsSecNSec3HashAlgorithm.Sha1, DnsSecNSec3Flags.None, 0,
                                                             new DataSegment(new byte[byte.MaxValue + 1]), DataSegment.Empty, new DnsType[0]);
     Assert.IsNull(resourceData);
     Assert.Fail();
 }