1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
This README is to describle the current form of the seed files
and the fields data they contain.
CAUTION: These specs are not to be considered stable and
are likely to change in the future.
============================================================
Python file excerpt of the GKEY named tuple class used to
represent the data in the seed file.
=============================================================
# some constants used in gkeyldap/actions.py
# they map the index values of the GKEY input data fields
NICK = 0
NAME = 1
KEYID = 2
LONGKEYID = 3
KEYDIR = 4
FINGERPRINT = 5
# set some defaults
KEY_LEN = {
'keyid': 8,
'longkeyid': 16,
}
class GKEY(namedtuple('GKEY', ['nick', 'name', 'keyid', 'longkeyid',
'keydir', 'fingerprint'])):
'''Class to hold the relavent info about a key'''
field_types = {'nick': str, 'name': str, 'keyid': list,
'longkeyid': list, 'keydir': str, 'fingerprint': list}
field_separator = "|"
list_separator = ":"
__slots__ = ()
=============================================================
Current fileds data in the seed files are:
=============================================================
field-0|field-1|field-2|filed-3|field-4|field-5
['nick', 'name', 'keyid', 'longkeyid', 'keydir', 'fingerprint']
fields2,3,5 may be lists with a ":" separating list members.
This is going to change to use a "," as the list separator.
Also, the keyid and longkeyid fileds are likely to be dropped, as version 3
gpg key types will not be used/allowed.
Therefore since the keyid and longkeyid are just substrings of the fingerprint.
They do not need to be tracked.
|