def ecdsa_verify(certificate_or_public_key, signature, data, hash_algorithm):
if certificate_or_public_key.algorithm != '<STR_LIT>':<EOL><INDENT>raise ValueError('<STR_LIT>')<EOL><DEDENT>return _verify(certificate_or_public_key, signature, data, hash_algorithm)<EOL>
Verifies an ECDSA signature

:param certificate_or_public_key:
    A Certificate or PublicKey instance to verify the signature with

:param signature:
    A byte string of the signature to verify

:param data:
    A byte string of the data the signature is for

:param hash_algorithm:
    A unicode string of "md5", "sha1", "sha256", "sha384" or "sha512"

:raises:
    oscrypto.errors.SignatureError - when the signature is determined to be invalid
    ValueError - when any of the parameters contain an invalid value
    TypeError - when any of the parameters are of the wrong type
    OSError - when an error is returned by the OS crypto library