Arthur de Jong

Open Source / Free Software developer

summaryrefslogtreecommitdiffstats
path: root/pskc/serialiser.py
Commit message (Collapse)AuthorAgeFilesLines
* Implement signature checkingArthur de Jong2017-12-271-2/+13
| | | | | | | | | | | | | | | This adds support for creating and verifying embedded XML signatures in PSKC files. This uses the third-party signxml library for actual signing and verification. The signxml library has a dependency on lxml and defusedxml (and a few others) but all parts of python-pskc still work correctly with our without lxml and/or defusedxml and signxml is only required when working with embedded signatures. This modifies the tox configuration to skip the signature checks if singxml is not installed and to only require 100% code coverage if the signature tests are done.
* Fix typo in pin_max_failed_attempts attributeArthur de Jong2017-12-181-2/+2
| | | | | This makes the old name (pin_max_failed_attemtps) available as a deprecated property.
* Refactor internal storate of encrypted valuesArthur de Jong2017-12-151-33/+45
| | | | | | | | | | | This changes the way encrypted values are stored internally before being decrypted. For example, the internal _secret property can now be a decrypted plain value or an EncryptedValue instance instead of always being a DataType, simplifying some things (e.g. all XML encoding/decoding is now done in the corresponding module). This should not change the public API but does have consequences for those who use custom serialisers or parsers.
* Implement our own XML formattingArthur de Jong2017-09-251-1/+1
| | | | | | This avoids a using xml.dom.minidom to indent the XML tree and keep the attributes ordered alphabetically. This also allows for customisations to the XML formatting.
* Fix bug in saving PBKDF2 salt on Python3Arthur de Jong2017-09-241-1/+1
| | | | | | | The PBKDF2 salt was saved in the wrong way (b'base64encodeddata' instead of base64encodeddata) when using Python 3. This fixes that problem and tests that saving and loading of a file that uses PBKDF2 key derivation works.
* Run flake8 from toxArthur de Jong2017-09-201-2/+1
| | | | | This also makes a few small code formatting changes to ensure that the flake8 tests pass.
* Various minor code style improvementsArthur de Jong2017-06-101-4/+5
|
* Ensure XML file ends with a newlineArthur de Jong2016-12-201-1/+1
|
* Also move outer writing and parsing to modulesArthur de Jong2016-09-241-1/+10
|
* Support separate device from keyArthur de Jong2016-09-171-22/+21
| | | | | | | | This allows having multiple keys per device while also maintaining the previous API. Note that having multiple keys per device is not allowed by the RFC 6030 schema but is allowed by some older internet drafts.
* Move XML generation to own moduleArthur de Jong2016-09-171-0/+214
Similar to the change for parsing, move the XML serialisation of PSKC data to a single class in a separate module.