Treat boolean functions as booleans

Use "!x" instead of "x <= 0", as these functions never return a negative
value.

Reviewed-by: Emilia Käsper <emilia@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
This commit is contained in:
Rob Percival
2016-03-07 18:38:06 +00:00
committed by Rich Salz
parent 8c92c4eac0
commit 70073f3e3a
5 changed files with 16 additions and 25 deletions

View File

@@ -347,15 +347,13 @@ void SCT_LIST_print(const STACK_OF(SCT) *sct_list, BIO *out, int indent,
/*
* Verifies an SCT with the given context.
* Returns 1 if the SCT verifies successfully, 0 if it cannot be verified and a
* negative integer if an error occurs.
* Returns 1 if the SCT verifies successfully, 0 otherwise.
*/
__owur int SCT_verify(const SCT_CTX *sctx, const SCT *sct);
/*
* Verifies an SCT against the provided data.
* Returns 1 if the SCT verifies successfully, 0 if it cannot be verified and a
* negative integer if an error occurs.
* Returns 1 if the SCT verifies successfully, 0 otherwise.
*/
__owur int SCT_verify_v1(SCT *sct, X509 *cert, X509 *preissuer,
X509_PUBKEY *log_pubkey, X509 *issuer_cert);