Submitted by: Julia Lawall <julia@diku.dk>
The functions ENGINE_ctrl(), OPENSSL_isservice(), EVP_PKEY_sign(), CMS_get1_RecipientRequest() and RAND_bytes() can return <=0 on error fix so the return code is checked correctly.
This commit is contained in:
@@ -280,7 +280,7 @@ int ENGINE_ctrl_cmd(ENGINE *e, const char *cmd_name,
|
||||
}
|
||||
/* Force the result of the control command to 0 or 1, for the reasons
|
||||
* mentioned before. */
|
||||
if (ENGINE_ctrl(e, num, i, p, f))
|
||||
if (ENGINE_ctrl(e, num, i, p, f) > 0)
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
@@ -345,7 +345,7 @@ int ENGINE_ctrl_cmd_string(ENGINE *e, const char *cmd_name, const char *arg,
|
||||
* usage of these commands is consistent across applications and
|
||||
* that certain applications don't understand it one way, and
|
||||
* others another. */
|
||||
if(ENGINE_ctrl(e, num, 0, (void *)arg, NULL))
|
||||
if(ENGINE_ctrl(e, num, 0, (void *)arg, NULL) > 0)
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
@@ -360,7 +360,7 @@ int ENGINE_ctrl_cmd_string(ENGINE *e, const char *cmd_name, const char *arg,
|
||||
if(flags & ENGINE_CMD_FLAG_STRING)
|
||||
{
|
||||
/* Same explanation as above */
|
||||
if(ENGINE_ctrl(e, num, 0, (void *)arg, NULL))
|
||||
if(ENGINE_ctrl(e, num, 0, (void *)arg, NULL) > 0)
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
@@ -383,7 +383,7 @@ int ENGINE_ctrl_cmd_string(ENGINE *e, const char *cmd_name, const char *arg,
|
||||
}
|
||||
/* Force the result of the control command to 0 or 1, for the reasons
|
||||
* mentioned before. */
|
||||
if(ENGINE_ctrl(e, num, l, NULL, NULL))
|
||||
if(ENGINE_ctrl(e, num, l, NULL, NULL) > 0)
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user