def _prep_certificate(certificate):
    """
    Append proper prefix and suffix text to a certificate. There is no
    standard way for storing certificates. OpenSSL expects the demarcation
    text. This method makes sure that the text the markers are present.

    :type text: :class:`str`
    :param text: The certificate of the service user.

    :rtype: :class:`str`
    :return: Normalized certificate
    """
    if not certificate.startswith('-----BEGIN CERTIFICATE-----'):
        return """-----BEGIN CERTIFICATE-----
%s
-----END CERTIFICATE-----""" % certificate
    return certificate