ce8234b5a84c81111aa226e37ad46cb886cde429
[stack/cam.git] / lib / paths.py
1
2 __all__ = [ 'getpath' ]
3
4 import os
5 from cfg import *
6
7
8 path_exts = dict(
9     conf = 'conf/%s.conf',
10     rsa_key = 'private/%s.key',
11     dsa_key = 'private/%s-dsa.key',
12     dsa_parms = 'private/%s.dsap',
13     rsa_csr = 'newcerts/%s.csr',
14     dsa_csr = 'newcerts/%s-dsa.csr',
15     rsa_crt = 'private/certs/%s.pem',
16     dsa_crt = 'private/certs/%s-dsa.pem',
17     ext = 'ext/%s.ext',
18     public_crt = 'public/certs/%s.pem',
19     singlefile = 'private/single-file/%s.pem',
20     )
21
22 def getpath(what, tag):
23     return os.path.join(ca_base, path_exts[what] % tag)
24
25