def check_cert(certfile):
    """
    output the text format of the certificate
    :param filepath: file path to the ssl certificate
    :returns: string
    """
    cmd = 'openssl x509 -in {} -text -noout'.format(certfile)
    out = subprocess.check_output(cmd, shell=True)
    return out