dsa_verify
API Overview
DSA_verify is an API in openssl. This rule belongs to the return value check type. This rule is generated using AURC.
Rule Description
tip
DSA_sign() and DSA_sign_setup() return 1 on success, 0 on error. DSA_verify() returns 1 for a valid signature, 0 for an incorrect 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("DSA_verify")
}
}
from OpenSSLFunctionCall call, UnaryOperation uop
where
uop.getOperator() = "!" and
uop.getOperand() = call.getAnAccess()
select uop, "This negation checks the return value of DSA_verify."