Commit Graph

62 Commits

Author SHA1 Message Date
Miek Gieben 06ae052c32 Implement returning errors from the scanner 2011-12-16 10:06:28 +01:00
Miek Gieben c6deba77e0 Fix the key parsing 2011-12-15 22:44:09 +01:00
Miek Gieben 35a1e137e2 More parsing fixes 2011-12-15 22:40:07 +01:00
Miek Gieben f4329cce16 More parsing tweaks 2011-12-15 18:03:41 +01:00
Miek Gieben 9168608abd More parsing fixes 2011-12-15 17:49:43 +01:00
Miek Gieben 081166db5e Fix the tests (Again) + NewRR(str)
Parse tests start to get working again
NewRR reads a string and is the easiest way to get an RR
in your code.
2011-12-15 17:37:07 +01:00
Miek Gieben 131f6962d1 gofmt 2011-12-09 21:45:57 +01:00
Miek Gieben 05eb569938 Test and fix dynamic updates
* Update to the new Go version
* Fix lot of things that need fixes

Need a why to communicate half RRs (i.e. A record without rdata)
2011-12-09 21:12:03 +01:00
Taral c1889c778d gofmt (excluding _examples) 2011-11-27 21:03:21 -08:00
Miek Gieben 406edadf20 Make the tests compile again 2011-09-10 21:22:42 +02:00
Miek Gieben 7ef1892814 Tests fails, but dont crash 2011-08-08 10:33:50 +02:00
Miek Gieben 05b7ac53dd Create qnamelist for nsec/nsec3 handling 2011-07-30 23:05:34 +02:00
Miek Gieben e016536cdc Add nsec(3) support in the core zone structure 2011-07-29 22:06:09 +02:00
Miek Gieben be10e40045 Fix Pop()
Need to check which of the rrs, rrsigs of nxt is actually filled
with the data and pop that.
2011-07-29 13:16:27 +02:00
Miek Gieben 33fbece4ca Add txt and fixup ds, ta and dlv 2011-07-29 12:18:20 +02:00
Miek Gieben caa1502c1e Add much more complex zone structure
A zone is stored in a
map[string]map[int]*ZRRset

where string is the qname and int (in the second map) is
qclass * <large number> + qtype, thereby making it unique.

ZRRset holds:
    RRs     RRset
    RRsigs  RRset
    Nsec    RR
    Nsec3   RR
    Glue    bool

Which holds the RRset for the zone contents. This is grouped
together for DNSSEC purposes, but also helps in non-DNSSEC zones.
(There is of course a increase in memory usage).
2011-07-28 22:47:55 +02:00
Miek Gieben b2a6356596 Fix opt pseudo section stuff 2011-07-25 11:24:26 +02:00
Miek Gieben 96ddebf335 add miek.nl.signed as a test zone
Add support for more RRs - I can now parse my own zone
2011-07-24 22:21:48 +02:00
Miek Gieben 00f8254ae1 Fix parsing of RRSIGs 2011-07-24 21:29:16 +02:00
Miek Gieben c52f05f9f5 More error checking 2011-07-24 17:32:41 +02:00
Miek Gieben 4671072027 Error handling
Handle semantic errors in the input stream.
Try to use Ragel's error handling when seeing a non-supported
class. This does not work yet.
2011-07-24 17:08:33 +02:00
Miek Gieben da0603089a gofmt -w 2011-07-23 23:43:43 +02:00
Miek Gieben 0dcfa0b427 Kill SetString
Create a NewRR that creates a new RR from a string.
FIx the tests to relfect this
2011-07-23 22:26:50 +02:00
Miek Gieben a1a0034733 More Go like
Make a Parser type and define methods on that.
* Zone()    parse and return entire zone
* RR()      parse and return 1 RR
* PrivateKey parse a private key file
2011-07-22 23:51:30 +02:00
Miek Gieben 2a8d7f9694 Make the API more Go like 2011-07-22 23:28:04 +02:00
Miek Gieben 4f6b1f7ee2 Correct the count 2011-07-22 22:07:45 +02:00
Miek Gieben c2a89d3184 Tweaks for parsing 2011-07-22 22:06:07 +02:00
Miek Gieben 7c716e66c0 Parsing zone files - does not work (yet) 2011-07-18 20:47:03 +02:00
Miek Gieben e50100848c Fix parsing of AAAA records 2011-07-18 17:40:55 +02:00
Miek Gieben e1bd7db73b More parsing tweaks 2011-07-18 16:06:06 +02:00
Miek Gieben 91b41d02bb SetString for DNSKEY and RRSIG 2011-07-18 15:49:20 +02:00
Miek Gieben 2eecc66477 SetString() for a bunch of RR - to be extended 2011-07-18 15:19:47 +02:00
Miek Gieben fd0064c805 Parsings works - clean up the tests
RR_DNSKEY has now a
* Read (to read an RR)
* ReadPrivateKey (to read an private key file)

Together you have enough data to sign and verify DNSSEC data.
I'm thinking about a better API, but I think one will emerge
whenever I complete the zone parsin.
2011-07-17 20:51:27 +02:00
Miek Gieben 8c595abe56 More parsing stuff 2011-07-17 15:47:03 +02:00
Miek Gieben 43d51f7382 private key parsing works on files/io.Reader 2011-07-17 11:35:58 +02:00
Miek Gieben fc96e3bfc5 Some tweaks. Next up: io.Reader to string for parsing 2011-07-15 18:09:41 +02:00
Miek Gieben 77df52c2f2 priv key parsing works also 2011-07-15 17:41:26 +02:00
Miek Gieben 981f1853bc First stab at parsing .priv key files with Ragel 2011-07-15 13:40:58 +02:00
Miek Gieben 6c4045c3a0 A add bunch of rr for parsing 2011-07-14 23:12:43 +02:00
Miek Gieben 77f4205cea I can parse rrs now 2011-07-14 21:25:15 +02:00
Miek Gieben bd03eda9f4 Tweaks 2011-07-14 16:11:16 +02:00
Miek Gieben 3f9b67632a RSA priv key reading works again 2011-07-08 18:21:29 +02:00
Miek Gieben 5e18c6fb24 Very small tweaks/bugfixes 2011-03-24 15:52:37 +01:00
Miek Gieben be6f2365cb Test compile again, but fail 2011-03-23 19:03:37 +01:00
Miek Gieben 369d06f1c7 Use line.Readline() 2011-03-23 18:53:16 +01:00
Miek Gieben 3af023bda9 Use bufio.Reader in private key reading 2011-03-23 16:10:15 +01:00
Miek Gieben 65acd06370 Quotes in txt records work 2011-02-21 21:32:12 +01:00
Miek Gieben 157c19af4b Fix real dots in domain names 2011-02-21 20:56:05 +01:00
Miek Gieben c7c4d8061e Allow for escaping of dots in domainnames 2011-02-21 20:33:36 +01:00
Miek Gieben 983ccc7909 IPv6 works ago. Updated the tests 2011-02-21 18:23:39 +01:00