Adjustments to 32406 per review

When we are failing because of a lack of a _required_ engine, note
that the engine was "required".

When engines are disabled, any required engine should cause a
failure.
This commit is contained in:
Nick Mathewson 2019-11-07 07:42:58 -05:00
parent c550990400
commit de7053b896
2 changed files with 8 additions and 2 deletions

View File

@ -290,6 +290,11 @@ crypto_openssl_init_engines(const char *accelName,
(void)accelName; (void)accelName;
(void)accelDir; (void)accelDir;
log_warn(LD_CRYPTO, "No OpenSSL hardware acceleration support enabled."); log_warn(LD_CRYPTO, "No OpenSSL hardware acceleration support enabled.");
if (accelName && accelName[0] == '!') {
log_warn(LD_CRYPTO, "Unable to load required dynamic OpenSSL engine "
"\"%s\".", accelName+1);
return -1;
}
return 0; return 0;
#else #else
ENGINE *e = NULL; ENGINE *e = NULL;
@ -312,7 +317,8 @@ crypto_openssl_init_engines(const char *accelName,
e = ENGINE_by_id(accelName); e = ENGINE_by_id(accelName);
} }
if (!e) { if (!e) {
log_warn(LD_CRYPTO, "Unable to load dynamic OpenSSL engine \"%s\".", log_warn(LD_CRYPTO, "Unable to load %sdynamic OpenSSL engine \"%s\".",
required?"required ":"",
accelName); accelName);
if (required) if (required)
return -1; return -1;

View File

@ -1 +1 @@
Unable to load dynamic OpenSSL engine "nonexistent_chartreuse_accelerator" Unable to load required dynamic OpenSSL engine "nonexistent_chartreuse_accelerator"