mirror of
				https://github.com/laurivosandi/certidude
				synced 2025-10-30 17:09:19 +00:00 
			
		
		
		
	Tagging fixes
This commit is contained in:
		| @@ -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") | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user