def maybe_key(pem_path):
acme_key_file = pem_path.child(u'<STR_LIT>')<EOL>if acme_key_file.exists():<EOL><INDENT>key = _load_pem_private_key_bytes(acme_key_file.getContent())<EOL><DEDENT>else:<EOL><INDENT>key = generate_private_key(u'<STR_LIT>')<EOL>acme_key_file.setContent(_dump_pem_private_key_bytes(key))<EOL><DEDENT>return succeed(JWKRSA(key=key))<EOL>
Set up a client key if one does not exist already.

https://gist.github.com/glyph/27867a478bb71d8b6046fbfb176e1a33#file-local-certs-py-L32-L50

:type pem_path: twisted.python.filepath.FilePath
:param pem_path:
    The path to the certificate directory to use.
:rtype: twisted.internet.defer.Deferred