Skip to main content

ecdsa_verify

API Overview

ECDSA_verify is an API in openssl. This rule belongs to the return value check type. This rule is generated using AURC.

Rule Description

tip

ECDSA_verify() and ECDSA_do_verify() return 1 for a valid signature, 0 for an invalid signature and -1 on error. The error codes can be obtained by L<ERR_get_error(3)>.

info
  • Tags: return value check
  • Parameter Index: N/A
  • CWE Type: CWE-253

Rule Code

import cpp

class OpenSSLFunctionCall extends FunctionCall {
OpenSSLFunctionCall() {
this.getTarget().hasName("ECDSA_verify")
}
}

from OpenSSLFunctionCall call, UnaryOperation uop
where
uop.getOperator() = "!" and
uop.getOperand() = call.getAnAccess()
select uop, "This negation checks the return value of ECDSA_verify."