Arthur de Jong

Open Source / Free Software developer

summaryrefslogtreecommitdiffstats
path: root/pskc/parse.py
Commit message (Collapse)AuthorAgeFilesLines
* Simplify finding ElementTree implementationArthur de Jong2014-06-151-10/+1
| | | | | These are the only ElementTree implementations that have been tested to provide the needed functionality (mostly namespaces).
* Refactor out some functions to parseArthur de Jong2014-06-151-0/+14
| | | | | This introduces the getint() and getbool() functions in parse to avoid some code duplication.
* Support various ElementTree implementationsArthur de Jong2014-06-141-0/+15
| | | | | | | | | | | When using a recent enough lxml, even Python 2.6 should work now. The most important requirement is that the findall() function supports the namespaces argument. This also now catches all exceptions when parsing the PSKC file fails and wraps it in ParseError because various implementations raise different exceptions, even between versions (Python 2.6's ElementTree raises ExpatError, lxml raises XMLSyntaxError).
* Have parse module provide find() functionsArthur de Jong2014-06-141-10/+31
| | | | | | | | This changes the parse module functions to better match the ElementTree API and extends it with findint(), findtime() and findbin(). It also passes the namespaces to all calls that require it without duplicating this throughout the normal code.
* Fix module descriptionArthur de Jong2014-04-191-2/+1
|
* Move PSKC class to toplevel moduleArthur de Jong2014-04-191-38/+0
| | | | This also splits the parsing to a parse() function for consistency.
* Provide pskc.parse docstringsArthur de Jong2014-04-191-1/+19
| | | | | This documents most of the API of the parsing functions and the PSKC class.
* Move Key class to separate moduleArthur de Jong2014-04-191-185/+2
| | | | This also allows re-organising the imports a bit.
* Use slightly clearer namesArthur de Jong2014-04-161-4/+4
|
* Implement MAC checkingArthur de Jong2014-04-121-0/+21
| | | | | This implements message message authentication code checking for the encrypted values if MACMethod and ValueMAC are present.
* Support decrypting with a pre-shared keyArthur de Jong2014-04-121-2/+20
| | | | | This adds an encryption module that provides wrappers for handling decryption.
* Refactor DataType value handlingArthur de Jong2014-04-121-35/+55
| | | | | This ensures that DataType values are retrieved dynamically instead of at the time the PSKC file was parsed in order to make decryption work.
* Implement key policy parsingArthur de Jong2014-04-111-2/+9
| | | | | This parses key policy from PSKC files and provides a few utility methods to help with policy validation.
* Support parsing date and integer valuesArthur de Jong2014-04-111-8/+23
|
* Get more data from KeyPackageArthur de Jong2014-04-071-0/+42
| | | | | This gets most simple string values from the KeyPackage as well as some integer and boolean values.
* Support getting plaintext keyArthur de Jong2014-04-071-0/+58
|
* Basic implementation of PSKC classArthur de Jong2014-04-071-0/+84
This class is used for handling PSKC files. It will parse the file and store relevant properties for easy access. The Key class corresponds to a single key defined in the PSKC file. This is a very minimal implementation that only provides some meta-data from the file and keys (work in progress).