mirror of
https://github.com/laurivosandi/certidude
synced 2024-12-22 08:15:18 +00:00
Tagging fixes
This commit is contained in:
parent
7a7f22c1a1
commit
d91e12942d
@ -56,7 +56,10 @@ class TagDetailResource(object):
|
||||
tags = set(getxattr(path, "user.xdg.tags").decode("utf-8").split(","))
|
||||
except IOError:
|
||||
tags = set()
|
||||
tags.remove(tag)
|
||||
try:
|
||||
tags.remove(tag)
|
||||
except KeyError:
|
||||
pass
|
||||
if "=" in tag:
|
||||
tags.add("%s=%s" % (tag.split("=")[0], value))
|
||||
else:
|
||||
|
@ -123,6 +123,7 @@ def revoke(common_name):
|
||||
attachments=(attach_cert,),
|
||||
serial_number="%x" % cert.serial,
|
||||
common_name=common_name)
|
||||
return revoked_path
|
||||
|
||||
def server_flags(cn):
|
||||
if config.USER_ENROLLMENT_ALLOWED and not config.USER_MULTIPLE_CERTIFICATES:
|
||||
@ -317,7 +318,7 @@ def _sign(csr, buf, overwrite=False):
|
||||
revoked_path = os.path.join(config.REVOKED_DIR, "%x.pem" % prev.serial)
|
||||
os.rename(signed_path, revoked_path)
|
||||
else:
|
||||
revoke(common_name.value)
|
||||
revoked_path = revoke(common_name.value)
|
||||
else:
|
||||
raise EnvironmentError("Will not overwrite existing certificate")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user