From e67ce7e966043b14a7aca82531e53c6566821c26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Sur=C3=BD?= Date: Thu, 12 Mar 2020 17:50:29 +0100 Subject: [PATCH] Use ISC_R_CRYPTOFAILURE instead DST_R_CRYPTOFAILURE in libisc 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 | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/isc/pk11.c b/lib/isc/pk11.c index 78e43326d1..1c33993a94 100644 --- a/lib/isc/pk11.c +++ b/lib/isc/pk11.c @@ -34,8 +34,6 @@ #include #include -#include - /* 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); }