summaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorTaylor R Campbell <campbell+openssl@mumble.net>2023-03-29 13:21:02 +0000
committerTomas Mraz <tomas@openssl.org>2023-03-31 12:23:45 +0200
commit1636b355ade558d01f5a826494264ca31d6aeeb7 (patch)
treed951d40f6f7d6605c97d01ee54d3c569f7d46f40 /engines
parent8189fe242bba319dfccd8805fd7703d973bf9649 (diff)
downloadopenssl-new-1636b355ade558d01f5a826494264ca31d6aeeb7.tar.gz
/dev/crypto: Suppress warning when open /dev/crypto fails with ENXIO.
On NetBSD the device node is essentially always present, but these days it's mostly not useful except for testing the kernel crypto stack since the cost of CPU crypto has gone down much faster than the cost of I/O to external crypto engines. So on most systems it is disabled in a way that makes open fail with ENXIO. NetBSD has had this warning for ENXIO patched away for years. CLA: trivial Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/20636)
Diffstat (limited to 'engines')
-rw-r--r--engines/e_devcrypto.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/e_devcrypto.c b/engines/e_devcrypto.c
index 49ebe00b63..92c8f0e356 100644
--- a/engines/e_devcrypto.c
+++ b/engines/e_devcrypto.c
@@ -1228,7 +1228,7 @@ static int open_devcrypto(void)
if ((fd = open("/dev/crypto", O_RDWR, 0)) < 0) {
#ifndef ENGINE_DEVCRYPTO_DEBUG
- if (errno != ENOENT)
+ if (errno != ENOENT && errno != ENXIO)
#endif
fprintf(stderr, "Could not open /dev/crypto: %s\n", strerror(errno));
return 0;