summaryrefslogtreecommitdiff
path: root/dns/renderer.py
Commit message (Collapse)AuthorAgeFilesLines
* Add dns.tsig.Key class.Brian Wellington2020-07-011-5/+12
| | | | | | | | | | | | | | | | | | | | This creates a new class to represent a TSIG key, containing name, secret, and algorithm. The keyring format is changed to be {name : key}, and the methods in dns.tsigkeyring are updated to deal with old and new formats. The Message class is updated to use dns.tsig.Key, although (to avoid breaking existing code), it stores them in the keyring field. Message.use_tsig() can accept either explicit keys, or keyrings; it will extract and/or create a key. dns.message.from_wire() can accept either a key or a keyring in the keyring parameter. If passed a key, it will now raise if the TSIG record in the message was signed with a different key. If passed a keyring containing keys (as opposed to bare secrets), it will check that the TSIG record's algorithm matches that of the key.
* Test (and fix) renderer.add_multi_tsig().Brian Wellington2020-06-301-1/+1
|
* Store a TSIG rrset on the message object.Brian Wellington2020-06-301-27/+15
|
* In add_edns(), the value of _make_opt() is an RRSet not an rdataset.Bob Halley2020-06-291-1/+1
|
* Refactor OPT handling code into OPT record class. (#520)Brian Wellington2020-06-261-15/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | * Create an OPT record class. * Move OPT logic to one place. * Store the OPT record on the message object. This also adds a Renderer.add_rdata() method. * Add Rdataset.rdata_to_wire() helper. * Fix conflicts; simplify. * Fix typo. * style * Add a trivial to_text so that repr() works. * Add _parse_special_rr_header * More OPT checking. Pass the name to _parse_rr_header and _parse_special_rr_header, and check that the OPT record has the root name.
* Simplify renderer code.Brian Wellington2020-06-171-60/+38
| | | | | | Use context manager to avoid duplicating length checking in many places. Change the code dealing with EDNS options to avoid lots of seeking by not rendering directly into the file.
* Minor Python 3 cleanups.Brian Wellington2020-06-031-1/+1
| | | | | | | Classes inherit from object by default; there's no need to explicitly include this. Replace super(Foo, self) with super().
* In library code, replace from io import BytesIO (or StringIO) with import ioBob Halley2020-05-011-3/+3
|
* Remove _compat module.Bob Halley2018-12-091-2/+1
|
* update copyrightBob Halley2018-12-011-0/+2
|
* add dns.renderer.Renderer.add_multi_tsig()Stefan Majewsky2017-09-141-2/+36
|
* render and tokenizer epydoc removalBob Halley2017-01-161-99/+25
|
* Pylint: enable unused-import checkMartin Basti2016-06-271-1/+0
|
* Fix typosJakub Wilk2016-05-261-1/+1
|
* python3 supportArthur Gautier2016-04-211-7/+12
| | | | Signed-off-by: Arthur Gautier <baloo@gandi.net>
* fix typoBob Halley2013-05-301-1/+1
|
* update copyrightsBob Halley2011-05-121-1/+1
|
* fix doco typoBob Halley2011-05-031-1/+2
|
* fix docoBob Halley2010-01-131-1/+1
|
* tsig import cleanups; rename tsig signing routing from "hmac_md5" to "sign"Bob Halley2010-01-131-10/+10
|
* update copyrights for 2010Bob Halley2010-01-131-1/+1
|
* add support for more TSIG algorithmsBob Halley2009-11-131-2/+4
|
* update copyrightsBob Halley2009-06-181-1/+1
|
* EDNS option supportBob Halley2009-03-301-2/+23
|
* set_rcode() was broken when used with extended rcodes; keep ednsflags ↵Bob Halley2008-06-031-12/+15
| | | | coherent with edns version
* update copyrights for 2007Bob Halley2007-01-011-1/+1
|
* update copyrightsBob Halley2005-09-021-1/+1
| | | | | Original author: Bob Halley <halley@dnspython.org> Date: 2005-01-08 08:13:48
* remove cvs $Id$ tagsBob Halley2005-09-021-2/+0
| | | | | Original author: Bob Halley <halley@dnspython.org> Date: 2004-07-31 09:51:40
* import random in dns.rendererBob Halley2005-09-021-0/+1
| | | | | Original author: Bob Halley <halley@dnspython.org> Date: 2004-07-31 06:09:32
* initial importBob Halley2005-09-021-0/+299
Original author: Bob Halley <halley@dnspython.org> Date: 2004-03-23 21:57:40