]> git.ipfire.org Git - thirdparty/knot-dns.git/commitdiff
Replace DNSSEC_P11_TOKEN_NOT_AVAILABLE with KNOT_P11_ETOKEN
authorDaniel Salzman <daniel.salzman@nic.cz>
Wed, 22 Oct 2025 06:14:03 +0000 (08:14 +0200)
committerLibor Peltan <libor.peltan@nic.cz>
Fri, 24 Oct 2025 07:17:08 +0000 (09:17 +0200)
src/libknot/dnssec/error.c
src/libknot/dnssec/error.h
src/libknot/dnssec/keystore/pkcs11.c
src/libknot/errcode.h
src/libknot/error.c

index 731b540d33a72a1b1b5a31a603984a2238c27fef..240792f53573b511de9442834c9219a682aa167e 100644 (file)
@@ -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" },
index de38473c85a5727f53f8113150a4ac31fb43d6e0..684c066f108c543709e931ae881fa91e6b23a7ff 100644 (file)
@@ -67,7 +67,7 @@ enum dnssec_error {
 
        KNOT_P11_ELOAD,
        KNOT_ERANGE,
-       DNSSEC_P11_TOKEN_NOT_AVAILABLE,
+       KNOT_P11_ETOKEN,
 
        KNOT_EALGORITHM,
        KNOT_ECRYPTO,
index a6e3c7b14fed9d1322fafc7ef22efc4f4c8f9e74..45744c04962eda913401a55c08e96bff8220e7af 100644 (file)
@@ -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;
index af6205535413592caaf2bff3bc7e5f7c54f9b0b8..afa69f0999bb5fa198208057cad24dbc9473757b 100644 (file)
@@ -182,6 +182,7 @@ enum knot_error {
        KNOT_EALGORITHM,
        KNOT_ECRYPTO,
        KNOT_P11_ELOAD,
+       KNOT_P11_ETOKEN,
        KNOT_P11_ECONFIG,
 
        KNOT_ERROR_MAX = -501
index af2c622c58927f4a313e8649150c8c9d243e0ca9..5a7237866c7482c79d009c8934f2059e45d802df 100644 (file)
@@ -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 */