summaryrefslogtreecommitdiff
path: root/apps/lib/engine.c
diff options
context:
space:
mode:
authorEnji Cooper <ngie@FreeBSD.org>2026-01-29 01:30:35 +0000
committerEnji Cooper <ngie@FreeBSD.org>2026-01-29 01:30:35 +0000
commit677808048e318ef0c4ad69c0c2cc8d82167bffbe (patch)
treebef7f1ad0365b42b56b6b8082996024b8483b96b /apps/lib/engine.c
parent12b8f7324509729dbf5c06c0e8fbc4723d3eefb3 (diff)
Diffstat (limited to 'apps/lib/engine.c')
-rw-r--r--apps/lib/engine.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/apps/lib/engine.c b/apps/lib/engine.c
index 209c4b6b03c2..c486a10513e3 100644
--- a/apps/lib/engine.c
+++ b/apps/lib/engine.c
@@ -19,7 +19,7 @@
#include <openssl/types.h> /* Ensure we have the ENGINE type, regardless */
#include <openssl/err.h>
#ifndef OPENSSL_NO_ENGINE
-# include <openssl/engine.h>
+#include <openssl/engine.h>
#endif
#include "apps.h"
@@ -60,8 +60,8 @@ ENGINE *setup_engine_methods(const char *id, unsigned int methods, int debug)
if (debug)
(void)ENGINE_ctrl(e, ENGINE_CTRL_SET_LOGSTREAM, 0, bio_err, 0);
if (!ENGINE_ctrl_cmd(e, "SET_USER_INTERFACE", 0,
- (void *)get_ui_method(), 0, 1)
- || !ENGINE_set_default(e, methods)) {
+ (void *)get_ui_method(), 0, 1)
+ || !ENGINE_set_default(e, methods)) {
BIO_printf(bio_err, "Cannot use engine \"%s\"\n", ENGINE_get_id(e));
ERR_print_errors(bio_err);
ENGINE_free(e);
@@ -113,8 +113,7 @@ char *make_engine_uri(ENGINE *e, const char *key_id, const char *desc)
BIO_printf(bio_err, "No engine key id specified for loading %s\n", desc);
} else {
const char *engineid = ENGINE_get_id(e);
- size_t uri_sz =
- sizeof(ENGINE_SCHEME_COLON) - 1
+ size_t uri_sz = sizeof(ENGINE_SCHEME_COLON) - 1
+ strlen(engineid)
+ 1 /* : */
+ strlen(key_id)
@@ -151,9 +150,9 @@ int get_legacy_pkey_id(OSSL_LIB_CTX *libctx, const char *algname, ENGINE *e)
ameth = ENGINE_get_pkey_asn1_meth_str(e, algname, -1);
else
#endif
- /* We're only interested if it comes from an ENGINE */
- if (tmpeng == NULL)
- ameth = NULL;
+ /* We're only interested if it comes from an ENGINE */
+ if (tmpeng == NULL)
+ ameth = NULL;
ERR_pop_to_mark();
if (ameth == NULL)