mirror of
https://github.com/openssl/openssl.git
synced 2024-11-27 05:21:51 +08:00
Fix post-condition in algorithm_do_this
Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Ben Kaduk <kaduk@mit.edu> (Merged from https://github.com/openssl/openssl/pull/12760)
This commit is contained in:
parent
2b748d722b
commit
1010e4ac97
@ -31,7 +31,7 @@ static int algorithm_do_this(OSSL_PROVIDER *provider, void *cbdata)
|
|||||||
int first_operation = 1;
|
int first_operation = 1;
|
||||||
int last_operation = OSSL_OP__HIGHEST;
|
int last_operation = OSSL_OP__HIGHEST;
|
||||||
int cur_operation;
|
int cur_operation;
|
||||||
int ok = 0;
|
int ok = 1;
|
||||||
|
|
||||||
if (data->operation_id != 0)
|
if (data->operation_id != 0)
|
||||||
first_operation = last_operation = data->operation_id;
|
first_operation = last_operation = data->operation_id;
|
||||||
@ -77,9 +77,9 @@ static int algorithm_do_this(OSSL_PROVIDER *provider, void *cbdata)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If post-condition fulfilled, set general success */
|
/* If post-condition not fulfilled, set general failure */
|
||||||
if (ret)
|
if (!ret)
|
||||||
ok = 1;
|
ok = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
return ok;
|
return ok;
|
||||||
|
Loading…
Reference in New Issue
Block a user