@classmethod
def from_pem_file(cls, pem_file):
    """Read a single PEM-encoded certificate from a file.

        Args:
            pem_file: the certificate file.

        Returns:
            a Certificate object
        """
    with open(pem_file, 'rb') as pem_cert_file:
        return cls.from_pem(pem_cert_file.read())
