Commit Graph

3105 Commits

Author SHA1 Message Date
Miek Gieben 241f9e6ce5 There is a copyright file now 2014-11-03 08:04:16 +00:00
Andrew Tunnell-Jones 9862d7044a SIG0 misc - doc, bounds checking, refactor tests
* expand documentation a little and tweak comments
* add bounds checking in Verify()
* refactor tests
2014-11-02 23:20:08 +00:00
Miek Gieben 53a0935749 Documentation cleanups 2014-11-02 11:39:12 +00:00
Miek Gieben deb8fe381f Cleanup the identical parsing functions.
Some records are copies from others: DNSKEY, CDNSKEY and KEY are
identical. DS, CDS and DLV are too and even RRSIG and SIG.

The parsing functions and the definition can all be used for parsing
all these identical types.
2014-11-02 11:29:55 +00:00
Miek Gieben 678d31fa77 Merge branch 'master' of github.com:miekg/dns 2014-11-02 11:12:07 +00:00
Miek Gieben d2c3cd6b0b Merge pull request #144 from andrewtj/atj-sig0
SIG(0)
2014-11-02 11:11:46 +00:00
Miek Gieben a945149fab Print unknown record type with CLASSX and TYPEX
When printing unknown records it is best to print the entire thing
as unknown, instead of relying on the internal defined type. An
example A record, printed as an unknown one:
    miek.nl.      3600    CLASS1  TYPE1   \# 4 0a000101
2014-11-02 11:06:05 +00:00
Andrew Tunnell-Jones bc85c128bd Test SIG(0)
Tests message signing and verification against
itself, that altered messages don't pass and that
expired messages don't pass.

Static samples generated by something else would
be good to add at some point.
2014-11-02 00:28:01 +00:00
Andrew Tunnell-Jones 91b8c69a22 Implement SIG(0) signing and verification
This is based on @miekg's sig0 branch. That branch diverged from master
and I didn't want to wander off on a rebase.

As implemented there's no allowance for multi-envelope (TCP) support.

TODO:

* unpackUint32() could be moved out and used elsewhere
* tests
* multi-envelope support (if useful)
2014-11-01 11:32:46 +00:00
Andrew Tunnell-Jones 5bccac1c47 Fix off-by-one error parsing DSA public key
I ran into a slice bounds out of range panic. Tired so I just rewrote it.
2014-11-01 10:54:01 +00:00
Miek Gieben a50b50cd89 Merge branch 'master' of github.com:miekg/dns 2014-10-30 13:44:26 +00:00
Miek Gieben 6bbae6c6ea Add CDNSKEY support 2014-10-23 22:18:23 +01:00
Miek Gieben 71466895f7 Remove ECC which was set as alg 4
There is no alg 4 and ECC is not an algorithm identifier.
2014-10-23 08:12:02 +00:00
Miek Gieben 6c47bdacd8 Merge pull request #142 from axaxs/master
DNSSEC algorithm and digest types now uint8
2014-10-23 09:07:24 +01:00
Alex A Skinner c417e9729d DNSSEC algorithm and digest types now uint8 2014-10-22 20:41:03 -04:00
Miek Gieben 467e368cc1 check for overflowing msg len when unpacking A
unclebadtouches catched this.

closes #141
2014-10-22 21:08:34 +01:00
Miek Gieben d8da4d2fa7 Fix: drop requests with *cough* qr set.
Err, yeah.
2014-10-19 09:36:26 +00:00
Miek Gieben 6b75215519 Merge pull request #137 from asergeyev/master
LOC typeToParserFunc fix and mnemonics for CERT rr
2014-10-08 17:50:57 +01:00
Miek Gieben 3d0face066 Fixup tests 2014-10-08 14:35:23 +00:00
Miek Gieben de954625b6 Add ErrExtendedRcode and fix up the callers 2014-10-08 14:31:28 +00:00
Miek Gieben 089554ccd1 Rename to ExtendedRcode and fix a comment 2014-10-08 14:29:46 +00:00
Miek Gieben df37bb6f5d Merge branch 'master' of github.com:miekg/dns 2014-10-08 14:28:31 +00:00
Miek Gieben af1ec6e545 Merge pull request #135 from FiloSottile/ext_rcode
Add support for extended RCODEs and detect bad RCODEs
2014-10-08 15:28:22 +01:00
Alex Sergeyev efb2e66078 Added support for mnemonic names in CERT rr
This behavior matches what bind does with thir formatting.
2014-10-07 21:27:25 -04:00
Alex Sergeyev 75472702d9 LOC record trips slurp detector.
Reverted recent true->false change for it to mitigate that.
2014-10-07 20:47:55 -04:00
Miek Gieben 06e7420b3e Merge branch 'master' of github.com:miekg/dns 2014-10-06 10:58:03 +00:00
Miek Gieben ce9b1fdbf8 Add TODOs 2014-10-06 10:57:49 +00:00
Miek Gieben d05369e629 tests: remove parse_test.db
Make it an string inside the test file and use strings.NewReader.
2014-10-06 07:45:31 +01:00
Filippo Valsorda 9088298b2b Add support for extended RCODEs and detect bad RCODEs 2014-09-26 12:18:36 +01:00
Miek Gieben c12ae078ae Merge pull request #134 from asergeyev/master
Attempting to fix #133
2014-09-24 14:15:31 +01:00
Miek Gieben 2cc86b011d Merge pull request #132 from FiloSottile/fix_OPT
Fix the OPT RR Version get code and simplify DO get/set
2014-09-24 11:42:48 +01:00
Alex Sergeyev aaf867499e Attempting to fix #133
- Trying to get as close to original state as possible
- Since private RR should not run slurp, toggling Variable there.
2014-09-23 21:59:09 -04:00
Filippo Valsorda 43fe5fb12c Fix the OPT RR Version get code and simplify DO get/set 2014-09-23 17:55:36 +01:00
Miek Gieben 45e66bfe1d Rename ParseTextSlice to Parse.
Shorter.
2014-09-21 19:09:13 +01:00
Miek Gieben 45f3dc89e4 Rename CopyRdata to just Copy.
Still not sure if this makes things more clear.
2014-09-21 18:30:16 +01:00
Miek Gieben 685f708a9e Rename RdataLen to just Len 2014-09-21 18:21:34 +01:00
Miek Gieben f0e9df42dc fix example 2014-09-21 18:14:34 +01:00
Miek Gieben 3a0c4f2cfa Lowercase error output 2014-09-21 12:10:55 +01:00
Miek Gieben 6d6b8b8599 small update in the README 2014-09-21 09:13:29 +01:00
Miek Gieben 6ee673464d Small doc update 2014-09-21 09:09:50 +01:00
Miek Gieben 9c9f3646ff More naming and some docs 2014-09-21 09:07:26 +01:00
Miek Gieben b90da23741 Fix tests and examples.
Put all examples in the same file and cleanup the tests to use
the new names.
2014-09-21 08:38:17 +01:00
Miek Gieben 11aaecf837 remove private rr tests into example_test.go 2014-09-21 08:32:11 +01:00
Miek Gieben 9c455b0214 PrivateRR: naming naming naming
Try to find better (=more in sync with the rest of the lib) naming. My
guess is that these are better, but YMMV.
2014-09-21 08:28:38 +01:00
Miek Gieben 7e792338bb Move custom* filenames to private to be in sync with the type 2014-09-21 07:56:01 +01:00
Miek Gieben 475e47edf9 Merge pull request #131 from asergeyev/customrr
Added Private RR support
2014-09-21 07:52:50 +01:00
Miek Gieben b80cbbdf6a Merge branch 'master' of github.com:miekg/dns 2014-09-21 07:47:52 +01:00
Miek Gieben e6b3ae712b extra docs 2014-09-21 07:43:46 +01:00
Alex Sergeyev fcf9302ae1 Changed logic to typeswitch and added comments.
And also added my name to contrib list as promised before.
2014-09-20 18:15:42 -04:00
Alex Sergeyev 8aab8c6fb2 Lots of renamed funcs and structures. More readability. 2014-09-20 18:07:36 -04:00