openssl/openssl

working "include" directive

Open

#26,474 opened on Jan 19, 2025

View on GitHub
 (8 comments) (0 reactions) (0 assignees)C (11,262 forks)batch import
help wantedtriaged: feature

Repository metrics

Stars
 (30,157 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

Directive .include is added long time but does not work. For instance if directive is uncommented user should be able to add or remove an provider just by adding/removing configuration file.

Sample with FIPS provider is good stating point.


Long time ago I did test with multiple engines and result is that .include directive could in default section but in following context:

openssl_conf = config

.include .../openssl.d/

[ config ]

Then included engine configuration must match one and the same structure:

[ config ]
engines = section_engine

[ section_engine ]
engine1 = engine_foo
...

If I remember well engines must point to one and the same section name otherwise only first processed is loaded.

Additional test to indicated that included configuration does not break main was to output oids from main configuration.


Off topic. Looks like configuration parsers(modules) keep state when included file ends. Perhaps they should reset internal state.

Contributor guide