from pathlib import Path


def read_certificate_file(certificate_file: Path) -> str:
    """Read the contents of the local X.509 certificate file and returns the string

    :param certificate_file: X.509 client certificate to read
    :type certificate_file: Path
    :return: PEM encoded certificate
    :rtype: str
    """

    # the certificate format is not modified
    with open(certificate_file, "r") as f:
        data = f.read()
    return data