]> git.ipfire.org Git - thirdparty/knot-dns.git/commitdiff
Replace DNSSEC_KEYSTORE_INVALID_CONFIG with KNOT_P11_ECONFIG
authorDaniel Salzman <daniel.salzman@nic.cz>
Wed, 22 Oct 2025 06:05:19 +0000 (08:05 +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 c678584bd4cb43918cbf4543b3548a5cabcdd445..948a337b6ed356ea3a809a9934618766032694a0 100644 (file)
@@ -51,7 +51,7 @@ static const error_message_t ERROR_MESSAGES[] = {
        { DNSSEC_INVALID_DS_ALGORITHM,  "invalid DS algorithm" },
        { KNOT_ECRYPTO, "DS hashing error" },
 
-       { DNSSEC_KEYSTORE_INVALID_CONFIG,  "invalid KASP keystore configuration" },
+       { KNOT_EINVAL,  "invalid KASP keystore configuration" },
 
        { DNSSEC_P11_FAILED_TO_LOAD_MODULE, "failed to load PKCS #11 module" },
        { DNSSEC_P11_TOO_MANY_MODULES,      "too many PKCS #11 modules loaded" },
index 768935eee7a7f560c81126d6e19fee706d39dbcd..5926a3d4d93a7dfa60d0f15f801b94b891b858d3 100644 (file)
@@ -63,7 +63,7 @@ enum dnssec_error {
        KNOT_EALGORITHM,
        KNOT_ECRYPTO,
 
-       DNSSEC_KEYSTORE_INVALID_CONFIG,
+       KNOT_EINVAL,
 
        DNSSEC_P11_FAILED_TO_LOAD_MODULE,
        DNSSEC_P11_TOO_MANY_MODULES,
index 4d22b697c1708d647db59b3927df19a138cc1c85..b840e112d6ece5357dc93566547f7c01b4dc22fe 100644 (file)
@@ -78,7 +78,7 @@ static int parse_config(const char *config, char **uri_ptr, char **module_ptr)
 {
        const char *space = strchr(config, ' ');
        if (!space) {
-               return DNSSEC_KEYSTORE_INVALID_CONFIG;
+               return KNOT_P11_ECONFIG;
        }
 
        char *url = strndup(config, space - config);
index 546f906a3b2f355ebb48ca3c39a78d7ad1219b0e..0f611fbef64e99649107d83e13d15d4f0f881b93 100644 (file)
@@ -181,6 +181,7 @@ enum knot_error {
        KNOT_KEY_EGENERATE,
        KNOT_EALGORITHM,
        KNOT_ECRYPTO,
+       KNOT_P11_ECONFIG,
 
        KNOT_ERROR_MAX = -501
 };
index ec71814960a8a63d7632625dd1a2eb1486a782ee..3450d58bafc0b7c63c74a14bffe463a5b35981f0 100644 (file)
@@ -180,6 +180,7 @@ static const struct error errors[] = {
        { KNOT_KEY_EGENERATE,          "failed to generate key" },
        { KNOT_EALGORITHM,             "invalid hash algorithm" },
        { KNOT_ECRYPTO,                "crypto operation failed" },
+       { KNOT_P11_ECONFIG,            "invalid PKCS #11 configuration" },
 
        /* Terminator */
        { KNOT_ERROR, NULL }