Do not complain when /dev/crypto does not exist.
[openssl.git] / crypto / engine / eng_devcrypto.c
index bfdb8fc68a5c6ad22373df3c56218f95f0c24d9a..ec6337de118de619d0cec99f6cdc34394deaa003 100644 (file)
@@ -25,6 +25,8 @@
 
 #include "internal/engine.h"
 
+/* #define ENGINE_DEVCRYPTO_DEBUG */
+
 #ifdef CRYPTO_ALGORITHM_MIN
 # define CHECK_BSD_STYLE_MACROS
 #endif
@@ -1156,7 +1158,10 @@ void engine_load_devcrypto_int()
     ENGINE *e = NULL;
 
     if ((cfd = open("/dev/crypto", O_RDWR, 0)) < 0) {
-        fprintf(stderr, "Could not open /dev/crypto: %s\n", strerror(errno));
+#ifndef ENGINE_DEVCRYPTO_DEBUG
+        if (errno != ENOENT)
+#endif
+            fprintf(stderr, "Could not open /dev/crypto: %s\n", strerror(errno));
         return;
     }