mirror of
https://gitlab.nic.cz/knot/knot-dns.git
synced 2026-02-03 18:49:28 -05:00
libknot/dnssec/keystore: properly detect GnuTLS analogue of KNOT_ENOENT
WARNING: It's still to be verified if the original (r == 0) really equals to KNOT_ENOENT.
This commit is contained in:
parent
2c2a37d8dc
commit
39cdb8f69a
1 changed files with 3 additions and 3 deletions
|
|
@ -305,10 +305,10 @@ static int pkcs11_remove_key(void *_ctx, const char *id)
|
|||
}
|
||||
|
||||
r = gnutls_pkcs11_delete_url(url, GNUTLS_PKCS11_OBJ_FLAG_LOGIN);
|
||||
if (r < 0) {
|
||||
return KNOT_ERROR;
|
||||
} else if (r == 0) {
|
||||
if (r == 0 || r == GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE) {
|
||||
return KNOT_ENOENT;
|
||||
} else if (r < 0) {
|
||||
return KNOT_ERROR;
|
||||
}
|
||||
|
||||
return KNOT_EOK;
|
||||
|
|
|
|||
Loading…
Reference in a new issue