mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2025-01-11 17:04:19 +01:00
Do not complain when /dev/crypto does not exist.
Now the new devcrypto engine is enabled since r342009, many users started seeing "Could not open /dev/crypto: No such file or directory". Disable the annoying error message as it is not very useful anyway. Note the patch was submitted upstream. https://github.com/openssl/openssl/pull/7896
This commit is contained in:
parent
90b566fde9
commit
49ea0a812a
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=342057
@ -24,6 +24,8 @@
|
|||||||
|
|
||||||
#include "internal/engine.h"
|
#include "internal/engine.h"
|
||||||
|
|
||||||
|
/* #define ENGINE_DEVCRYPTO_DEBUG */
|
||||||
|
|
||||||
#ifdef CRYPTO_ALGORITHM_MIN
|
#ifdef CRYPTO_ALGORITHM_MIN
|
||||||
# define CHECK_BSD_STYLE_MACROS
|
# define CHECK_BSD_STYLE_MACROS
|
||||||
#endif
|
#endif
|
||||||
@ -615,6 +617,9 @@ void engine_load_devcrypto_int()
|
|||||||
ENGINE *e = NULL;
|
ENGINE *e = NULL;
|
||||||
|
|
||||||
if ((cfd = open("/dev/crypto", O_RDWR, 0)) < 0) {
|
if ((cfd = open("/dev/crypto", O_RDWR, 0)) < 0) {
|
||||||
|
#ifndef ENGINE_DEVCRYPTO_DEBUG
|
||||||
|
if (errno != ENOENT)
|
||||||
|
#endif
|
||||||
fprintf(stderr, "Could not open /dev/crypto: %s\n", strerror(errno));
|
fprintf(stderr, "Could not open /dev/crypto: %s\n", strerror(errno));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user