]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Use ISC_R_CRYPTOFAILURE instead DST_R_CRYPTOFAILURE in libisc
authorOndřej Surý <ondrej@isc.org>
Thu, 12 Mar 2020 16:50:29 +0000 (17:50 +0100)
committerOndřej Surý <ondrej@isc.org>
Thu, 12 Mar 2020 16:50:29 +0000 (17:50 +0100)
There was a circular libisc dependency on libdns headers for
DST_R_CRYPTOFAILURE return code.  Replace it with ISC_R_CRYPTOFAILURE to
break the loop.

lib/isc/pk11.c

index 78e43326d19962fe638e0b9d9e8e4811fc96f81d..1c33993a94557ea39fa853a17aeda41350baf064 100644 (file)
@@ -34,8 +34,6 @@
 #include <pkcs11/eddsa.h>
 #include <pkcs11/pkcs11.h>
 
-#include <dst/result.h>
-
 /* was 32 octets, Petr Spacek suggested 1024, SoftHSMv2 uses 256... */
 #ifndef PINLEN
 #define PINLEN 256
@@ -422,7 +420,7 @@ free_session_list(pk11_sessionlist_t *slist) {
                if (sp->session != CK_INVALID_HANDLE) {
                        rv = pkcs_C_CloseSession(sp->session);
                        if (rv != CKR_OK) {
-                               ret = DST_R_CRYPTOFAILURE;
+                               ret = ISC_R_CRYPTOFAILURE;
                        }
                }
                LOCK(&sessionlock);
@@ -445,7 +443,7 @@ setup_session(pk11_session_t *sp, pk11_token_t *token, bool rw) {
        rv = pkcs_C_OpenSession(token->slotid, flags, NULL_PTR, NULL_PTR,
                                &sp->session);
        if (rv != CKR_OK) {
-               return (DST_R_CRYPTOFAILURE);
+               return (ISC_R_CRYPTOFAILURE);
        }
        return (ISC_R_SUCCESS);
 }