summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/engine/eng_cnf.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/engine/eng_cnf.c')
-rw-r--r--src/lib/libcrypto/engine/eng_cnf.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/lib/libcrypto/engine/eng_cnf.c b/src/lib/libcrypto/engine/eng_cnf.c
index a97e01e619..8417ddaaef 100644
--- a/src/lib/libcrypto/engine/eng_cnf.c
+++ b/src/lib/libcrypto/engine/eng_cnf.c
@@ -98,6 +98,8 @@ static int int_engine_configure(char *name, char *value, const CONF *cnf)
98 CONF_VALUE *ecmd; 98 CONF_VALUE *ecmd;
99 char *ctrlname, *ctrlvalue; 99 char *ctrlname, *ctrlvalue;
100 ENGINE *e = NULL; 100 ENGINE *e = NULL;
101 int soft = 0;
102
101 name = skip_dot(name); 103 name = skip_dot(name);
102#ifdef ENGINE_CONF_DEBUG 104#ifdef ENGINE_CONF_DEBUG
103 fprintf(stderr, "Configuring engine %s\n", name); 105 fprintf(stderr, "Configuring engine %s\n", name);
@@ -125,6 +127,8 @@ static int int_engine_configure(char *name, char *value, const CONF *cnf)
125 /* Override engine name to use */ 127 /* Override engine name to use */
126 if (!strcmp(ctrlname, "engine_id")) 128 if (!strcmp(ctrlname, "engine_id"))
127 name = ctrlvalue; 129 name = ctrlvalue;
130 else if (!strcmp(ctrlname, "soft_load"))
131 soft = 1;
128 /* Load a dynamic ENGINE */ 132 /* Load a dynamic ENGINE */
129 else if (!strcmp(ctrlname, "dynamic_path")) 133 else if (!strcmp(ctrlname, "dynamic_path"))
130 { 134 {
@@ -147,6 +151,11 @@ static int int_engine_configure(char *name, char *value, const CONF *cnf)
147 if (!e) 151 if (!e)
148 { 152 {
149 e = ENGINE_by_id(name); 153 e = ENGINE_by_id(name);
154 if (!e && soft)
155 {
156 ERR_clear_error();
157 return 1;
158 }
150 if (!e) 159 if (!e)
151 return 0; 160 return 0;
152 } 161 }