diff options
| author | djm <> | 2010-10-01 22:54:21 +0000 |
|---|---|---|
| committer | djm <> | 2010-10-01 22:54:21 +0000 |
| commit | 829fd51d4f8dde4a7f3bf54754f3c1d1a502f5e2 (patch) | |
| tree | e03b9f1bd051e844b971936729e9df549a209130 /src/lib/libcrypto/engine/eng_cnf.c | |
| parent | e6b755d2a53d3cac7a344dfdd6bf7c951cac754c (diff) | |
| download | openbsd-829fd51d4f8dde4a7f3bf54754f3c1d1a502f5e2.tar.gz openbsd-829fd51d4f8dde4a7f3bf54754f3c1d1a502f5e2.tar.bz2 openbsd-829fd51d4f8dde4a7f3bf54754f3c1d1a502f5e2.zip | |
import OpenSSL-1.0.0a
Diffstat (limited to 'src/lib/libcrypto/engine/eng_cnf.c')
| -rw-r--r-- | src/lib/libcrypto/engine/eng_cnf.c | 17 |
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; |
