def format_as_pem(cert_string):
    """Adds ASCII armor to the specified PEM base46 certificate."""
    i = 64
    while i<len(cert_string):
        cert_string = cert_string[0:i] + '\n' + cert_string[i:]
        i+=65
    cert_string = "-----BEGIN CERTIFICATE-----\n" + cert_string + "\n-----END CERTIFICATE-----"
    return cert_string