'Create PKI credentials for TLS access to libvirtd.
Credentials are not signed by the host CA. This only allows
unverified access but removes the need to transfer files
between the host and the guest.'

@staticmethod
def create_credentials(path):

    ca = RootCredential.initialize(path, 'CA')
    ca_file = path.child(AUTHORITY_CERTIFICATE_FILENAME)
    NodeCredential.initialize(path, ca, uuid='client')
    ca_file.moveTo(path.child('cacert.pem'))
    path.child('client.key').moveTo(path.child('clientkey.pem'))
    path.child('client.crt').moveTo(path.child('clientcert.pem'))
