Skip to content

Commit 3ea8f4e

Browse files
committed
engine: Only register those algos specified with default_algorithms
As part of OpenSSL initialization, the engine(s) configured in the OpenSSL config file are loaded, and its algorithms (methods) are registered according to the default_algorithms setting. However, later during initialization, ENGINE_register_all_complete() is called which unconditionally registered all algorithms (methods) of the loaded engines again, unless the engine flag ENGINE_FLAGS_NO_REGISTER_ALL is set. Set the ENGINE_FLAGS_NO_REGISTER_ALL flag during IBMCA engine initialization to avoid unconditional registration of all algorithms. We only want to register algorithms specified in the default_algorithms configuration setting. Note that if the default_algorithms setting is omitted in the OpenSSL config file, then no algorithms will be registered. Signed-off-by: Ingo Franzki <ifranzki@linux.ibm.com>
1 parent e8983a4 commit 3ea8f4e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/engine/e_ibmca.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -642,6 +642,9 @@ static int set_supported_meths(ENGINE *e)
642642
if (!ENGINE_set_pkey_meths(e, ibmca_engine_pkey_meths))
643643
goto out;
644644

645+
if (!ENGINE_set_flags(e, ENGINE_FLAGS_NO_REGISTER_ALL))
646+
goto out;
647+
645648
rc = 1;
646649
out:
647650
free(pmech_list);

0 commit comments

Comments
 (0)