Compare commits

..

1 Commits

Author SHA1 Message Date
Emmanuel Garette 5c8981d580 add OpenSSH plugin 2021-05-08 19:02:31 +02:00
1 changed files with 4 additions and 3 deletions

View File

@ -109,10 +109,11 @@ class OpenSSHIssuerPlugin(CryptographyIssuerPlugin):
).decode() ).decode()
public_key += ' ' + cert['user']['email'] public_key += ' ' + cert['user']['email']
# sign it with authority private key # sign it with authority private key
if 'root_authority' in cert: if 'root_authority' in cert and cert['root_authority']:
root_authority = cert['root_authority'] authority = cert['root_authority']
else: else:
root_authority = get_by_root_authority(cert['authority']['id']) authority = cert['authority']
root_authority = get_by_root_authority(authority['id'])
authority_private_key = root_authority.private_key authority_private_key = root_authority.private_key
cert['body'] = sign_certificate( cert['body'] = sign_certificate(
cert['common_name'], cert['common_name'],