Added revoke support to cfssl plugin (#1007)
* Added revoke support to cfssl plugin
This commit is contained in:
committed by
kevgliss
parent
dfb9e3a0c8
commit
5ac3ecb85e
@ -53,6 +53,14 @@ def parse_certificate(body):
|
||||
return x509.load_pem_x509_certificate(body, default_backend())
|
||||
|
||||
|
||||
def get_authority_key(body):
|
||||
"""Returns the authority key for a given certificate in hex format"""
|
||||
parsed_cert = parse_certificate(body)
|
||||
authority_key = parsed_cert.extensions.get_extension_for_class(
|
||||
x509.AuthorityKeyIdentifier).value.key_identifier
|
||||
return authority_key.hex()
|
||||
|
||||
|
||||
def generate_private_key(key_type):
|
||||
"""
|
||||
Generates a new private key based on key_type.
|
||||
|
Reference in New Issue
Block a user