chiark / gitweb /
keys/tripe-keys.in, keys/tripe-keys.conf.5.in: Allow setting attributes.
[tripe] / keys / tripe-keys.in
index ce9f74dc35b171bfb139d83f2c682cb4b7735785..f40f3965ee0970b13baca580a613bbb6e6cc5d2a 100644 (file)
@@ -244,11 +244,13 @@ def conf_defaults():
                                             'ec': 'ec-param'}[conf['kx']]),
                ('kx-param', lambda: {'dh': '-LS -b3072 -B256',
                                      'ec': '-Cnist-p256'}[conf['kx']]),
+               ('kx-attrs', ''),
                ('kx-expire', 'now + 1 year'),
                ('kx-warn-days', '28'),
                ('cipher', 'rijndael-cbc'),
                ('hash', 'sha256'),
                ('master-keygen-flags', '-l'),
+               ('master-attrs', ''),
                ('mgf', '${hash}-mgf'),
                ('mac', lambda: '%s-hmac/%d' %
                          (conf['hash'],
@@ -360,7 +362,7 @@ def cmd_newmaster(args):
   run('''key -kmaster add
     -a${sig-genalg} !${sig-param}
     -e${sig-expire} !${master-keygen-flags} -tmaster-%d tripe-keys-master
-    sig=${sig} hash=${sig-hash}''' % seq)
+    sig=${sig} hash=${sig-hash} !${master-attrs}''' % seq)
   run('key -kmaster extract -f-secret repos/master.pub')
 
 ###--------------------------------------------------------------------------
@@ -371,7 +373,8 @@ def cmd_setup(args):
   run('''key -krepos/param add
     -a${kx-param-genalg} !${kx-param}
     -eforever -tparam tripe-param
-    kx-group=${kx} cipher=${cipher} hash=${hash} mac=${mac} mgf=${mgf}''')
+    kx-group=${kx} mgf=${mgf} mac=${mac}
+    cipher=${cipher} hash=${hash} ${kx-attrs}''')
   cmd_newmaster(args)
 
 ###--------------------------------------------------------------------------