def create_self_signed(cls, name, prefix, password, public_key_algorithm='rsa',
            life_time=365, key_length=2048):
        """
        Create a self signed client protection CA. To prevent browser warnings during
        decryption, you must trust the signing certificate in the client browsers.
        
        :param str name: Name of this ex: "SG Root CA" Used as Key.
            Real common name will be derivated at creation time with a uniqueId.
        :param str prefix: prefix used for derivating file names
        :param str password: password for private key
        :param public_key_algorithm: public key algorithm, either rsa, dsa or ecdsa
        :param str,int life_time: lifetime in days for CA
        :param int key_length: length in bits, either 1024 or 2048
        :raises CreateElementFailed: creating element failed
        :raises ActionCommandFailed: failed to self sign the certificate
        :rtype: ClientProtectionCA
        """
        json = {'key_name': name,
                'prefix': prefix,
                'password': password,
                'life_time': life_time,
                'key_size': key_length,
                'algorithm': public_key_algorithm}
    
        tls = ClientProtectionCA.create(name)
        try:
            tls.make_request(
                method='create',
                json=json,
                resource='generate_self_signed_cert')
        except ActionCommandFailed:
            tls.delete()
            raise
        return tls
Create a self signed client protection CA. To prevent browser warnings during
        decryption, you must trust the signing certificate in the client browsers.
        
        :param str name: Name of this ex: "SG Root CA" Used as Key.
            Real common name will be derivated at creation time with a uniqueId.
        :param str prefix: prefix used for derivating file names
        :param str password: password for private key
        :param public_key_algorithm: public key algorithm, either rsa, dsa or ecdsa
        :param str,int life_time: lifetime in days for CA
        :param int key_length: length in bits, either 1024 or 2048
        :raises CreateElementFailed: creating element failed
        :raises ActionCommandFailed: failed to self sign the certificate
        :rtype: ClientProtectionCA