2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 06:25:31 +00:00

Replace custom isc_boolean_t with C standard bool type

This commit is contained in:
Ondřej Surý
2018-04-17 08:29:14 -07:00
parent cb6a185c69
commit 994e656977
546 changed files with 10785 additions and 10367 deletions

View File

@@ -15,6 +15,8 @@
#if HAVE_OPENSSL_ED25519 || HAVE_OPENSSL_ED448
#include <stdbool.h>
#include <isc/mem.h>
#include <isc/safe.h>
#include <isc/sha2.h>
@@ -452,21 +454,21 @@ openssleddsa_verify(dst_context_t *dctx, const isc_region_t *sig) {
return (ret);
}
static isc_boolean_t
static bool
openssleddsa_compare(const dst_key_t *key1, const dst_key_t *key2) {
int status;
EVP_PKEY *pkey1 = key1->keydata.pkey;
EVP_PKEY *pkey2 = key2->keydata.pkey;
if (pkey1 == NULL && pkey2 == NULL)
return (ISC_TRUE);
return (true);
else if (pkey1 == NULL || pkey2 == NULL)
return (ISC_FALSE);
return (false);
status = EVP_PKEY_cmp(pkey1, pkey2);
if (status == 1)
return (ISC_TRUE);
return (ISC_FALSE);
return (true);
return (false);
}
static isc_result_t
@@ -521,23 +523,23 @@ openssleddsa_generate(dst_key_t *key, int unused, void (*callback)(int)) {
return (ret);
}
static isc_boolean_t
static bool
openssleddsa_isprivate(const dst_key_t *key) {
EVP_PKEY *pkey = key->keydata.pkey;
int len;
unsigned long err;
if (pkey == NULL)
return (ISC_FALSE);
return (false);
len = i2d_PrivateKey(pkey, NULL);
if (len > 0)
return (ISC_TRUE);
return (true);
/* can check if first error is EC_R_INVALID_PRIVATE_KEY */
while ((err = ERR_get_error()) != 0)
/**/;
return (ISC_FALSE);
return (false);
}
static void