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.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/lib/libcrypto/engine/eng_cnf.c b/src/lib/libcrypto/engine/eng_cnf.c
index 08066cea59..95c4070015 100644
--- a/src/lib/libcrypto/engine/eng_cnf.c
+++ b/src/lib/libcrypto/engine/eng_cnf.c
@@ -95,7 +95,7 @@ static int int_engine_configure(char *name, char *value, const CONF *cnf)
95 int ret = 0; 95 int ret = 0;
96 long do_init = -1; 96 long do_init = -1;
97 STACK_OF(CONF_VALUE) *ecmds; 97 STACK_OF(CONF_VALUE) *ecmds;
98 CONF_VALUE *ecmd; 98 CONF_VALUE *ecmd = NULL;
99 char *ctrlname, *ctrlvalue; 99 char *ctrlname, *ctrlvalue;
100 ENGINE *e = NULL; 100 ENGINE *e = NULL;
101 int soft = 0; 101 int soft = 0;
@@ -157,7 +157,7 @@ static int int_engine_configure(char *name, char *value, const CONF *cnf)
157 return 1; 157 return 1;
158 } 158 }
159 if (!e) 159 if (!e)
160 return 0; 160 goto err;
161 } 161 }
162 /* Allow "EMPTY" to mean no value: this allows a valid 162 /* Allow "EMPTY" to mean no value: this allows a valid
163 * "value" to be passed to ctrls of type NO_INPUT 163 * "value" to be passed to ctrls of type NO_INPUT
@@ -186,16 +186,27 @@ static int int_engine_configure(char *name, char *value, const CONF *cnf)
186 } 186 }
187 else if (!ENGINE_ctrl_cmd_string(e, 187 else if (!ENGINE_ctrl_cmd_string(e,
188 ctrlname, ctrlvalue, 0)) 188 ctrlname, ctrlvalue, 0))
189 return 0; 189 goto err;
190 } 190 }
191 191
192 192
193 193
194 } 194 }
195 if (e && (do_init == -1) && !int_engine_init(e)) 195 if (e && (do_init == -1) && !int_engine_init(e))
196 {
197 ecmd = NULL;
196 goto err; 198 goto err;
199 }
197 ret = 1; 200 ret = 1;
198 err: 201 err:
202 if (ret != 1)
203 {
204 ENGINEerr(ENGINE_F_INT_ENGINE_CONFIGURE, ENGINE_R_ENGINE_CONFIGURATION_ERROR);
205 if (ecmd)
206 ERR_add_error_data(6, "section=", ecmd->section,
207 ", name=", ecmd->name,
208 ", value=", ecmd->value);
209 }
199 if (e) 210 if (e)
200 ENGINE_free(e); 211 ENGINE_free(e);
201 return ret; 212 return ret;