Arthur de Jong

Open Source / Free Software developer

summaryrefslogtreecommitdiffstats
path: root/pskc/xml.py
Commit message (Collapse)AuthorAgeFilesLines
* Add support for older Internet Draft versionArthur de Jong2016-12-211-12/+14
| | | | | | | | | | | | | | This adds support for parsing most examples from draft-ietf-keyprov-pskc-02. That file uses a few other names for elements and attributes of the PSKC file and a few other minor differences. The XML parsing has been changed to allow specifying multiple matches and the find*() functions now return the first found match. While all examples from draft-ietf-keyprov-pskc-02 are tested support for verifying digital signatures and asymmetric keys have not yet been implemented.
* Adapt coverage pragma annotationsArthur de Jong2016-12-201-2/+2
| | | | | This fixes the pragma directives to be be correct independently of whether lxml is installed or not.
* Improve branch coverageArthur de Jong2016-09-141-1/+1
| | | | This enables branch coverage testing and adds tests to improve coverage.
* Copy namespaces to toplevel elementArthur de Jong2016-03-201-0/+11
| | | | | | Ensure that when writing an XML file all namespace definitions are on the toplevel KeyContainer element instead of scattered throughout the XML document.
* Support both CheckDigit and CheckDigitsArthur de Jong2016-03-191-2/+9
| | | | | | RFC 6030 is not clear about whether the attribute of ChallengeFormat and ResponseFormat should be the singular CheckDigit or the plural CheckDigits. This ensures that both forms are accepted.
* Strip XML namespaces before parsingArthur de Jong2016-01-241-15/+22
| | | | | | | | | This simplifies calls to the find() family of functions and allows parsing PSKC files that have slightly different namespace URLs. This is especially common when parsing old draft versions of the specification. This also removes passing multiple patterns to the find() functions that was introduced in 68b20e2.
* Support Python 3Arthur de Jong2015-10-061-3/+3
| | | | | | | | This enables support for Python 3 together with Python 2 support with a single codebase. On Python 3 key data is passed around as bytestrings which makes the doctests a little harder to maintain across Python versions.
* Fix issue with namespaced PBKDF2 parametersArthur de Jong2015-10-061-16/+17
| | | | | | | | | | | | The find() utility functions now allow specifying multiple paths to be searched where the first match is returned. This allows handling PSKC files where the PBKDF2 salt, iteration count, key length and PRF elements are prefixed with the xenc11 namespace. A test including such a PSKC file has been included. Thanks to Eric Plet for reporting this.
* Rename pskc.parse to pskc.xmlArthur de Jong2014-10-091-0/+165
This renames the parse module to xml to better reflect the purpose of the module and it's functions. This also introduces a parse() function that wraps etree.parse().