commit
3476d3bcf3
|
@ -21,13 +21,13 @@ CertificateCreatorNeed = partial(CertificateCreator, 'key')
|
||||||
|
|
||||||
class ViewKeyPermission(Permission):
|
class ViewKeyPermission(Permission):
|
||||||
def __init__(self, certificate_id, owner):
|
def __init__(self, certificate_id, owner):
|
||||||
c_need = CertificateCreatorNeed(str(certificate_id))
|
c_need = CertificateCreatorNeed(certificate_id)
|
||||||
super(ViewKeyPermission, self).__init__(c_need, RoleNeed(owner), RoleNeed('admin'))
|
super(ViewKeyPermission, self).__init__(c_need, RoleNeed(owner), RoleNeed('admin'))
|
||||||
|
|
||||||
|
|
||||||
class UpdateCertificatePermission(Permission):
|
class UpdateCertificatePermission(Permission):
|
||||||
def __init__(self, certificate_id, owner):
|
def __init__(self, certificate_id, owner):
|
||||||
c_need = CertificateCreatorNeed(str(certificate_id))
|
c_need = CertificateCreatorNeed(certificate_id)
|
||||||
super(UpdateCertificatePermission, self).__init__(c_need, RoleNeed(owner), RoleNeed('admin'))
|
super(UpdateCertificatePermission, self).__init__(c_need, RoleNeed(owner), RoleNeed('admin'))
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -320,6 +320,7 @@ def create_csr(csr_config):
|
||||||
x509.BasicConstraints(ca=False, path_length=None), critical=True,
|
x509.BasicConstraints(ca=False, path_length=None), critical=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if csr_config.get('extensions'):
|
||||||
for k, v in csr_config.get('extensions', {}).items():
|
for k, v in csr_config.get('extensions', {}).items():
|
||||||
if k == 'subAltNames':
|
if k == 'subAltNames':
|
||||||
# map types to their x509 objects
|
# map types to their x509 objects
|
||||||
|
|
Loading…
Reference in New Issue