# ELIBBAD vs. ENOENT for ciphers not allowed by FIPS

- From: Petr Vorel \<pvorel@suse.cz\>
- Date: 2021-12-22 19:11:21 
- List: linux-crypto
- Page: https://ratatoskr.run/linux-crypto/2021/12/8491256
- Thread: https://ratatoskr.run/linux-crypto/2021/12/8491256/t.md

```text
Hi Herbert,

do I understand the crypto code correctly, that although crypto/testmgr.c in
alg_test() returns -EINVAL for non-fips allowed algorithms (that means
failing crypto API test) the API in crypto_alg_lookup() returns -ELIBBAD for
failed test?

Why ELIBBAD and not ENOENT like for missing ciphers? To distinguish between
missing cipher and disabled one due fips?

Kind regards,
Petr
```
