From: Daniel Salzman Date: Wed, 22 Oct 2025 06:14:03 +0000 (+0200) Subject: Replace DNSSEC_P11_TOKEN_NOT_AVAILABLE with KNOT_P11_ETOKEN X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1e8f6a6cd0748e325b4ee9bece67933671bdc47c;p=thirdparty%2Fknot-dns.git Replace DNSSEC_P11_TOKEN_NOT_AVAILABLE with KNOT_P11_ETOKEN --- diff --git a/src/libknot/dnssec/error.c b/src/libknot/dnssec/error.c index 731b540d33..240792f535 100644 --- a/src/libknot/dnssec/error.c +++ b/src/libknot/dnssec/error.c @@ -55,7 +55,7 @@ static const error_message_t ERROR_MESSAGES[] = { { KNOT_P11_ELOAD, "failed to load PKCS #11 module" }, { KNOT_ERANGE, "too many PKCS #11 modules loaded" }, - { DNSSEC_P11_TOKEN_NOT_AVAILABLE, "PKCS #11 token not available" }, + { KNOT_P11_ETOKEN, "PKCS #11 token not available" }, { DNSSEC_INVALID_DIGEST_ALGORITHM, "invalid digest algorithm" }, { KNOT_ECRYPTO, "digest error" }, diff --git a/src/libknot/dnssec/error.h b/src/libknot/dnssec/error.h index de38473c85..684c066f10 100644 --- a/src/libknot/dnssec/error.h +++ b/src/libknot/dnssec/error.h @@ -67,7 +67,7 @@ enum dnssec_error { KNOT_P11_ELOAD, KNOT_ERANGE, - DNSSEC_P11_TOKEN_NOT_AVAILABLE, + KNOT_P11_ETOKEN, KNOT_EALGORITHM, KNOT_ECRYPTO, diff --git a/src/libknot/dnssec/keystore/pkcs11.c b/src/libknot/dnssec/keystore/pkcs11.c index a6e3c7b14f..45744c0496 100644 --- a/src/libknot/dnssec/keystore/pkcs11.c +++ b/src/libknot/dnssec/keystore/pkcs11.c @@ -120,7 +120,7 @@ static int safe_open(const char *config, char **url_ptr) r = gnutls_pkcs11_token_get_flags(url, &flags); if (r != GNUTLS_E_SUCCESS) { free(url); - return DNSSEC_P11_TOKEN_NOT_AVAILABLE; + return KNOT_P11_ETOKEN; } *url_ptr = url; diff --git a/src/libknot/errcode.h b/src/libknot/errcode.h index af62055354..afa69f0999 100644 --- a/src/libknot/errcode.h +++ b/src/libknot/errcode.h @@ -182,6 +182,7 @@ enum knot_error { KNOT_EALGORITHM, KNOT_ECRYPTO, KNOT_P11_ELOAD, + KNOT_P11_ETOKEN, KNOT_P11_ECONFIG, KNOT_ERROR_MAX = -501 diff --git a/src/libknot/error.c b/src/libknot/error.c index af2c622c58..5a7237866c 100644 --- a/src/libknot/error.c +++ b/src/libknot/error.c @@ -181,6 +181,7 @@ static const struct error errors[] = { { KNOT_EALGORITHM, "invalid hash algorithm" }, { KNOT_ECRYPTO, "crypto operation failed" }, { KNOT_P11_ELOAD, "failed to load PKCS #11 module" }, + { KNOT_P11_ETOKEN, "PKCS #11 token not available" }, { KNOT_P11_ECONFIG, "invalid PKCS #11 configuration" }, /* Terminator */