]> git.ipfire.org Git - thirdparty/knot-dns.git/commitdiff
Replace DNSSEC_SIGN_INIT_ERROR with KNOT_ECRYPTO
authorDaniel Salzman <daniel.salzman@nic.cz>
Wed, 22 Oct 2025 10:18:18 +0000 (12:18 +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/tsig.c

index 4dc8a41c3a58e5f36f600ff29cd4547a692d9170..e10fd29729cc6cdf4bb1c3947befc4808a7c3de4 100644 (file)
@@ -41,7 +41,7 @@ static const error_message_t ERROR_MESSAGES[] = {
        { KNOT_NO_PRIVATE_KEY,  "no private key" },
        { KNOT_EEXIST,  "key already present" },
 
-       { DNSSEC_SIGN_INIT_ERROR,       "signing initialization error" },
+       { KNOT_ECRYPTO, "signing initialization error" },
        { DNSSEC_SIGN_ERROR,            "signing error" },
        { DNSSEC_INVALID_SIGNATURE,     "invalid signature" },
 
index 374071e7d5f1f2478468b17ba62fb1aad0809006..38ebbf16b479e1adce8594d23540d02c956513c6 100644 (file)
@@ -53,7 +53,7 @@ enum dnssec_error {
        KNOT_NO_PRIVATE_KEY,
        KNOT_EEXIST,
 
-       DNSSEC_SIGN_INIT_ERROR,
+       KNOT_ECRYPTO,
        DNSSEC_SIGN_ERROR,
        DNSSEC_INVALID_SIGNATURE,
 
index 49a1aed303c61e52a29f27e3348b2e41f74d35f4..b86fd370168ad97dd39f48570045d9243982e455 100644 (file)
@@ -167,7 +167,7 @@ int dnssec_tsig_new(dnssec_tsig_ctx_t **ctx_ptr,
        int result = gnutls_hmac_init(&ctx->hash, ctx->algorithm, key->data, key->size);
        if (result != 0) {
                free(ctx);
-               return DNSSEC_SIGN_INIT_ERROR;
+               return KNOT_ECRYPTO;
        }
 
        *ctx_ptr = ctx;