'Generate a certificate signed by the supplied root certificate.
:param FilePath path: Directory where the certificate will be stored.
:param CertificateAuthority authority: The certificate authority with
which this certificate will be signed.
:param datetime begin: The datetime from which the generated
certificate should be valid.
:param bytes uuid: The UUID to be included in this certificate.
Generated if not supplied.'

@classmethod
def initialize(cls, path, authority, begin=None, uuid=None):

    if (uuid is None):
        uuid = bytes(uuid4())
    key_filename = '{uuid}.key'.format(uuid=uuid)
    cert_filename = '{uuid}.crt'.format(uuid=uuid)
    name = '{prefix}{uuid}'.format(prefix=cls._UUID_PREFIX, uuid=uuid)
    organizational_unit = authority.organizational_unit
    dn = DistinguishedName(commonName=name, organizationalUnitName=organizational_unit)
    keypair = flocker_keypair()
    request = keypair.keypair.requestObject(dn)
    serial = os.urandom(16).encode('hex')
    serial = int(serial, 16)
    cert = sign_certificate_request(authority.credential.keypair.keypair, authority.credential.certificate.original.get_subject(), request, serial, EXPIRY_20_YEARS, 'sha256', start=begin)
    credential = FlockerCredential(path=path, keypair=keypair, certificate=cert)
    credential.write_credential_files(key_filename, cert_filename)
    instance = cls(credential=credential)
    return instance
