mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-26 00:41:17 +00:00
0134f845da
This uses uci to configure engines, by generating a list of enabled engines in /var/etc/ssl/engines.cnf from engines configured in /etc/config/openssl: config engine 'devcrypto' option enabled '1' Currently the only options implemented are 'enabled', which defaults to true and enables the named engine, and the 'force' option, that enables the engine even if the init script thinks the engine does not exist. The existence test is to check for either a configuration file /etc/ssl/engines.cnf.d/%ENGINE%.cnf, or a shared object file /usr/lib/engines-1.1/%ENGINE%.so. The engine list is generated by an init script which is set to run after 'log' because it informs the engines being enabled or skipped. It should run before any service using OpenSSL as the crypto library, otherwise the service will not use any engine. Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
31 lines
845 B
Diff
31 lines
845 B
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Eneas U de Queiroz <cotequeiroz@gmail.com>
|
|
Date: Sat, 27 Mar 2021 17:43:25 -0300
|
|
Subject: openssl.cnf: add engine configuration
|
|
|
|
This adds configuration options for engines, loading all cnf files under
|
|
/etc/ssl/engines.cnf.d/.
|
|
|
|
Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
|
|
|
|
diff --git a/apps/openssl.cnf b/apps/openssl.cnf
|
|
--- a/apps/openssl.cnf
|
|
+++ b/apps/openssl.cnf
|
|
@@ -22,6 +22,16 @@ oid_section = new_oids
|
|
# (Alternatively, use a configuration file that has only
|
|
# X.509v3 extensions in its main [= default] section.)
|
|
|
|
+openssl_conf=openssl_conf
|
|
+
|
|
+[openssl_conf]
|
|
+engines=engines
|
|
+
|
|
+[engines]
|
|
+.include /var/etc/ssl/engines.cnf
|
|
+
|
|
+.include /etc/ssl/engines.cnf.d
|
|
+
|
|
[ new_oids ]
|
|
|
|
# We can add new OIDs in here for use by 'ca', 'req' and 'ts'.
|