dstucrypt/Agent-App — pull request #3 by muromec (2014-12-01 06:22:17+00:00)
Title: Introduce config files.

Config file is JSON structure that contains all keys and certs
added by user in Configuration view.

Config file is loaded on aplication startup and is saved every time
user makes changes to configuration by adding keys or certs.

Structure of config file:

- keys: object (dict) of values where index is string representation of
public key and value is dict describing object
- label - free text for user to identify key (optional)
- role - typed value for internal usage in pipelines (optional)
- privPem - mandatory field. contains PEM representation of
unprotected private key. doubled keys and keys stores
are not allowed here.
- certPEM - optional field. contains PEM representation of X509
certificate mathcing to private key
- identity - data extracted from certificate, only present when
certificate exists
- issuer - object (dict) with parsed DN. contains common name,
title, etc of CA
- subject - object (dict) with parsed DN. as above but desrcibes
key owner
- extension - parsed X509v3 extension dict including EDRPOU and
DRFO codes
- valid
- from - unix timestamp, date when ceritificate was issued
- to - unix timestamp, date when ceritifcate expires