Commit Graph

258 Commits

Author SHA1 Message Date
Miek Gieben
541776149c Merge pull request #85 from andrewtj/atj-encoding
Parsing and Stringer Changes
2014-03-02 16:48:46 +00:00
Miek Gieben
28a65aaf87 test: enable txt equal test
This test fails, but stops failing when I merge pull request #85.
2014-03-02 16:47:52 +00:00
Andrew Tunnell-Jones
588a52762d Test byte escaping in Domain Names and TXT strings
TestTXTRRQuick may not always cover these bytes so explicitly test that
they're covered.
2014-03-02 10:37:07 +00:00
Andrew Tunnell-Jones
22f3256df4 Bump up MaxCountScale in TestTXTRRQuick
Increases number of test iterations which should cover more corner-cases.
2014-03-02 10:15:26 +00:00
Miek Gieben
2ea84f6110 Add test for upcoming txt changes 2014-03-01 07:34:44 +00:00
Andrew Tunnell-Jones
f6d8a66c01 Add quick tests for domain name and TXT rr 2014-02-26 10:52:48 +00:00
Andrew Tunnell-Jones
c500de0e7a Fix HIP record unpacking
* limit decoding of Hit to HitLength
* limit decoding of PublicKey to PublicKeyLength
* limit decoding of RendezvousServers to rdata's length
2014-02-22 05:28:48 +00:00
Andrew Tunnell-Jones
158454ada4 Test packing label ending in escaped dot 2014-02-15 00:37:57 +00:00
Miek Gieben
82b2b6ec82 QuoteToASCII is needed
When not using this, TXT strings get interpreted by Golang, making
TXT behave unexpected. QuoteToASCII has surpises too, see
TestTxtEqual(), but this, I hope, lesser of an issue.
2014-01-11 17:17:38 +00:00
Miek Gieben
a49cd38336 Add quoteString function.
This is to just quote a string s -> "s"
2014-01-11 16:57:36 +00:00
Miek Gieben
3bd18e9a56 add test for matching text records 2014-01-11 16:32:08 +00:00
Miek Gieben
ef732d1050 RRSIGs: parse epoch timestamp too
According to RFC4034 the timestamp in RRSIG may also be an EPOCH.
Check for this when parsing. Knot DNS zone dumps contain timestamp
RRSIG, this makes those parseable by Go DNS.
2014-01-11 08:50:10 +00:00
Miek Gieben
c174304212 Add test for RRSIG with timestamp in epoch
This is standard's compliant but currently not supported.
2014-01-11 08:37:34 +00:00
Miek Gieben
f3af5834c2 Also add empty txt record in another test 2014-01-11 08:12:13 +00:00
Andrew Tunnell-Jones
938210c3ad Test parsing of TXT records containing empty-strings 2014-01-11 05:31:43 +00:00
Andrew Tunnell-Jones
91f31a2b71 Define length in multi-entry TXT parse length test in terms of header + rrdata 2014-01-11 05:30:46 +00:00
Andrew Tunnell-Jones
4584fc0cb3 Fix single-entry TXT parse length test 2014-01-11 05:28:47 +00:00
Miek Gieben
1f2f21480f merged 2013-12-05 19:46:03 +00:00
Miek Gieben
186871d2a9 Add check for > maxUint16 sizes TYPEXXXX or CLASSXXX
These were silently wrapped in a uint16, nicer to actually give
an error.
2013-12-05 09:54:46 +00:00
Miek Gieben
bc4b2fe244 Name this test better 2013-12-05 07:48:13 +00:00
Miek Gieben
792fd9743e Allow for escape spaces in NewRR
Fix omission in NewRR where the parsing does not allow for
escaped spaces (unless \032 was used).
2013-12-03 09:12:21 +00:00
Miek Gieben
8fec6dd3a3 Use *Token instead of Token when parsing
This result in a 10% speedup when parsing a zone from disk.
2013-11-09 19:34:46 +00:00
Miek Gieben
ff7806469c Implement EID and NIMLOC records 2013-10-19 21:31:12 +01:00
Miek Gieben
faf449027a small tweak in the test 2013-10-19 19:49:16 +01:00
Miek Gieben
b435d836c6 gofmt 2013-10-15 14:21:47 +00:00
Miek Gieben
35bcc78d76 Implement PX record 2013-10-13 13:23:02 +01:00
Miek Gieben
cc2c42cc91 Implement GPOS record 2013-10-13 13:01:33 +01:00
Miek Gieben
961e137891 Add NSAP and NSAP-PTR record 2013-10-13 12:25:08 +01:00
Ask Bjørn Hansen
8418a22857 Whitespace cleanup 2013-09-20 08:15:27 -07:00
Miek Gieben
b76ac5bde6 Fix the test 2013-09-12 08:14:42 +01:00
Miek Gieben
ee8ace0477 Merge branch 'master' of github.com:miekg/dns 2013-09-11 08:22:23 +01:00
Miek Gieben
32b15d1807 Add more IsDomainName tests 2013-09-11 08:22:20 +01:00
Miek Gieben
9c1ee5d5ca Update IsDomainName
This new functions just compiles the domain to wire format, if that
works, the name is deemed OK. It is also much less strict than the
older code. Almost everything is allowed in the name, except two
dots back to back (there is an explicit test for that).
2013-09-10 18:09:22 +00:00
Miek Gieben
a5ac1f46ee ...and fix the imports for the test files 2013-09-09 22:20:48 +01:00
Miek Gieben
81d35ce537 Move some functions to the correct file
DNSSEC tests go in dnssec_test.go
2013-09-09 22:19:24 +01:00
Miek Gieben
555318a03a Merge branch 'compress' 2013-06-29 09:49:12 +01:00
Miek Gieben
73e03fe818 Another txt variant to test for 2013-06-29 08:46:34 +01:00
Miek Gieben
57fae415e0 Get the testcases going 2013-06-26 20:34:40 +01:00
Miek Gieben
b9f82b0a36 Cherry-pick specific hunks 2013-06-26 20:33:01 +01:00
Miek Gieben
5ae9b5214f more testing and concurrent server benchmarking 2013-06-22 08:55:30 +01:00
Miek Gieben
5d094e6e2d gofmt 2013-06-14 19:42:55 +01:00
Miek Gieben
9ee7c27e18 Fix rawSetRdlength
When searching for the start of the rdata, the offset wasn't properly
calculated. This only impacted names with \DDD in it (weirdly enough).
2013-06-14 11:35:06 +00:00
Miek Gieben
3f348f173b \DDD to buf parsing fails (sometimes)
Added test (that fails for now)
2013-06-14 07:31:22 +01:00
Miek Gieben
5d84523f5b Move pack_test to parse_test 2013-06-13 19:19:40 +01:00
Miek Gieben
637fed84a4 Remove tests for zone 2013-06-05 20:41:53 +01:00
Miek Gieben
c66494c6c5 Resolv merge conflicts 2013-05-12 19:08:37 +02:00
Miek Gieben
f595bf7a06 Set license on test files 2013-05-12 16:09:52 +02:00
Miek Gieben
a5a709cd2a Rename securityConfig to sortedNames 2013-05-09 09:30:38 +02:00
Miek Gieben
1133a39996 Beter test and isWildcard function 2013-05-07 22:04:30 +02:00
Miek Gieben
e1151d6edc Update the Zone structure for NSEC and NSEC3 2013-05-07 09:44:21 +02:00
Miek Gieben
9a80799666 Fix remaining zone.Remove* functions
Fix the remove function and make them more like zone.Remove()
2013-05-05 21:52:21 +02:00
Miek Gieben
ba747fd510 Add some more tests 2013-05-05 20:30:39 +02:00
Miek Gieben
495b7d6552 Add UID/GID/UINFO record 2013-04-30 16:42:04 +02:00
Miek Gieben
f43b7368bd Add tests for EUIxx 2013-04-16 08:41:35 +01:00
Miek Gieben
ffca5f59b1 Make comments normative
Fixup the last RR and create a unit test
2013-03-04 15:40:22 +01:00
Miek Gieben
7b7eaaa4b0 Make (some) commments normative in zonefiles 2013-03-04 12:16:20 +01:00
Miek Gieben
525465db6d Add parse test and further tweaks 2013-03-04 11:24:08 +01:00
Miek Gieben
26994c382b gofmt 2013-01-28 14:34:18 +01:00
Miek Gieben
03c7b54668 Add parse test for DS record 2013-01-16 11:48:43 +01:00
Miek Gieben
3233964b4d Fix parse tests 2012-12-13 15:23:44 +01:00
Miek Gieben
7cdb2a8bc8 update the example tests 2012-12-13 14:57:19 +01:00
Miek Gieben
235e892dfc Rename the RR types drop the RR_ prefix
This is also done in the official Go library. It also make the
code shorter.
2012-12-09 19:23:25 +01:00
Miek Gieben
6e605f578e Make the line count error reporting more sane 2012-11-22 13:41:40 +01:00
Miek Gieben
fa55001b4c Add tests and fix bug in the parser
torc wasn't set in some part resulting in parsing a 'A' while
in fact the parsed record type should have been returned.
2012-11-22 11:54:46 +01:00
Miek Gieben
5a3db7b240 delayed newline counting
Fix a lot of corning cases for correct newline counting, but not
the ones where the closing brace is solely on a newline.
2012-11-21 22:21:40 +01:00
Miek Gieben
314a0eebcc Add support for L32, NID, L64 and LP records 2012-11-18 10:29:05 +01:00
Miek Gieben
5afca3330b Add tests and uppercase output of L64 2012-11-18 09:10:28 +01:00
Miek Gieben
43cadb2ffd Add parse test for octects in the name 2012-11-15 09:39:32 +01:00
Miek Gieben
dce8b2e71a gofmt 2012-10-10 22:17:50 +02:00
Miek Gieben
ca8b17dda2 Fix the tests 2012-10-09 22:15:33 +02:00
Miek Gieben
43f5cb9d27 add test 2012-10-05 09:49:31 +02:00
Miek Gieben
5c80e68e1e add tests 2012-09-17 08:56:27 +02:00
Miek Gieben
915781ea86 Better naming 2012-09-11 21:45:21 +02:00
Miek Gieben
49eebd3be4 fix benchmarking for zonedata 2012-08-25 21:30:16 +02:00
Miek Gieben
98e06078aa remove 2012-05-20 18:10:25 +02:00
Miek Gieben
251f3973f0 make it an example test 2012-05-20 15:41:14 +02:00
Miek Gieben
3a2cf2eda3 extra tests 2012-05-20 15:32:07 +02:00
Miek Gieben
9c67491aee cleanup and extra test 2012-05-20 15:31:35 +02:00
Miek Gieben
7a3af5b729 Support $GENERATE (the bind extension).
It is even better than the bind one, because all records are
supported (as long as the output is valid)
2012-05-20 15:28:27 +02:00
Miek Gieben
f0154aa0c2 Fix and test rfc 1982 arithmetic 2012-05-15 12:24:57 +02:00
Miek Gieben
3611c4d458 fmt 2012-05-05 17:37:48 +02:00
Miek Gieben
63f90d6546 LOC record parses (from wire and zonefiles) 2012-05-01 22:28:49 +02:00
Miek Gieben
79ea0f8e31 Fix LOC parsing 2012-05-01 22:21:44 +02:00
Miek Gieben
d30dcf93e0 Doesnt parse from string - otherwise it works 2012-04-30 23:59:15 +02:00
Miek Gieben
2ea2204a8b add test 2012-04-30 21:57:42 +02:00
Miek Gieben
d85d8f9fe9 Start adding LOC tests 2012-04-30 21:42:58 +02:00
Miek Gieben
872dc4fc6b Make the private key reading more natural 2012-04-15 20:55:25 +02:00
Miek Gieben
b58c604e17 Add symmetry to the reading of public/private keys
Add a NewPrivateKey that works on strings and calls ReadPrivateKey
that works on io.Readers.
2012-04-15 20:50:53 +02:00
Miek Gieben
134b557647 Start with validating Curve algos 2012-04-11 16:20:29 +02:00
Miek Gieben
1e1559423d Fix EC signing 2012-04-11 16:09:40 +02:00
Miek Gieben
b1099c10b8 More stuff for ecdsa. Need to find good abstraction 2012-04-11 15:42:33 +02:00
Miek Gieben
edf4b3d11b Test signing with ecdsa 2012-04-11 15:13:17 +02:00
Miek Gieben
a06e3e497c small tweak in the tests 2012-04-06 19:29:50 +02:00
Miek Gieben
df6d86e937 Fix for when not seeing an RR at all 2012-03-03 17:40:30 +01:00
Miek Gieben
3232814d1b Fix client side TSIG
Redesign of TSIG. Validation is on the TOOD - this can be
done in the same way as in the server.
2012-03-01 22:40:34 +01:00
Miek Gieben
172c89675c Add another weird looking RR to test 2012-03-01 09:16:28 +01:00
Miek Gieben
5fec355528 Allow TYPExxxx syntax in NSECx records 2012-02-28 20:20:07 +01:00
Miek Gieben
0c0b97f72b Parsing fix for lines starting with class or TTL
name.   IN SOA  a6.nstld.com. hostmaster.nic.name ....
              IN 7200   NS      j6.nstld.com.
              7200 IN     NS      k6.nstld.com.

Wasn't handled properly
2012-02-27 18:48:53 +01:00
Miek Gieben
89c05b4f74 gofmt 2012-02-23 19:37:08 +01:00
Miek Gieben
69cecf63bd Newline in text record 2012-02-23 19:15:06 +01:00