diff options
author | djm <> | 2010-10-01 22:59:01 +0000 |
---|---|---|
committer | djm <> | 2010-10-01 22:59:01 +0000 |
commit | fe047d8b632246cb2db3234a0a4f32e5c318857b (patch) | |
tree | 939b752540947d33507b3acc48d76a8bfb7c3dc3 /src/lib/libcrypto/engine/eng_dyn.c | |
parent | 2ea67f4aa254b09ded62e6e14fc893bbe6381579 (diff) | |
download | openbsd-fe047d8b632246cb2db3234a0a4f32e5c318857b.tar.gz openbsd-fe047d8b632246cb2db3234a0a4f32e5c318857b.tar.bz2 openbsd-fe047d8b632246cb2db3234a0a4f32e5c318857b.zip |
resolve conflicts, fix local changes
Diffstat (limited to 'src/lib/libcrypto/engine/eng_dyn.c')
-rw-r--r-- | src/lib/libcrypto/engine/eng_dyn.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/lib/libcrypto/engine/eng_dyn.c b/src/lib/libcrypto/engine/eng_dyn.c index acb30c34d8..807da7a5eb 100644 --- a/src/lib/libcrypto/engine/eng_dyn.c +++ b/src/lib/libcrypto/engine/eng_dyn.c | |||
@@ -146,14 +146,14 @@ struct st_dynamic_data_ctx | |||
146 | * 'dirs' for loading. Default is to use 'dirs' as a fallback. */ | 146 | * 'dirs' for loading. Default is to use 'dirs' as a fallback. */ |
147 | int dir_load; | 147 | int dir_load; |
148 | /* A stack of directories from which ENGINEs could be loaded */ | 148 | /* A stack of directories from which ENGINEs could be loaded */ |
149 | STACK *dirs; | 149 | STACK_OF(OPENSSL_STRING) *dirs; |
150 | }; | 150 | }; |
151 | 151 | ||
152 | /* This is the "ex_data" index we obtain and reserve for use with our context | 152 | /* This is the "ex_data" index we obtain and reserve for use with our context |
153 | * structure. */ | 153 | * structure. */ |
154 | static int dynamic_ex_data_idx = -1; | 154 | static int dynamic_ex_data_idx = -1; |
155 | 155 | ||
156 | static void int_free_str(void *s) { OPENSSL_free(s); } | 156 | static void int_free_str(char *s) { OPENSSL_free(s); } |
157 | /* Because our ex_data element may or may not get allocated depending on whether | 157 | /* Because our ex_data element may or may not get allocated depending on whether |
158 | * a "first-use" occurs before the ENGINE is freed, we have a memory leak | 158 | * a "first-use" occurs before the ENGINE is freed, we have a memory leak |
159 | * problem to solve. We can't declare a "new" handler for the ex_data as we | 159 | * problem to solve. We can't declare a "new" handler for the ex_data as we |
@@ -174,7 +174,7 @@ static void dynamic_data_ctx_free_func(void *parent, void *ptr, | |||
174 | if(ctx->engine_id) | 174 | if(ctx->engine_id) |
175 | OPENSSL_free((void*)ctx->engine_id); | 175 | OPENSSL_free((void*)ctx->engine_id); |
176 | if(ctx->dirs) | 176 | if(ctx->dirs) |
177 | sk_pop_free(ctx->dirs, int_free_str); | 177 | sk_OPENSSL_STRING_pop_free(ctx->dirs, int_free_str); |
178 | OPENSSL_free(ctx); | 178 | OPENSSL_free(ctx); |
179 | } | 179 | } |
180 | } | 180 | } |
@@ -203,7 +203,7 @@ static int dynamic_set_data_ctx(ENGINE *e, dynamic_data_ctx **ctx) | |||
203 | c->DYNAMIC_F1 = "v_check"; | 203 | c->DYNAMIC_F1 = "v_check"; |
204 | c->DYNAMIC_F2 = "bind_engine"; | 204 | c->DYNAMIC_F2 = "bind_engine"; |
205 | c->dir_load = 1; | 205 | c->dir_load = 1; |
206 | c->dirs = sk_new_null(); | 206 | c->dirs = sk_OPENSSL_STRING_new_null(); |
207 | if(!c->dirs) | 207 | if(!c->dirs) |
208 | { | 208 | { |
209 | ENGINEerr(ENGINE_F_DYNAMIC_SET_DATA_CTX,ERR_R_MALLOC_FAILURE); | 209 | ENGINEerr(ENGINE_F_DYNAMIC_SET_DATA_CTX,ERR_R_MALLOC_FAILURE); |
@@ -393,7 +393,7 @@ static int dynamic_ctrl(ENGINE *e, int cmd, long i, void *p, void (*f)(void)) | |||
393 | ERR_R_MALLOC_FAILURE); | 393 | ERR_R_MALLOC_FAILURE); |
394 | return 0; | 394 | return 0; |
395 | } | 395 | } |
396 | sk_insert(ctx->dirs, tmp_str, -1); | 396 | sk_OPENSSL_STRING_insert(ctx->dirs, tmp_str, -1); |
397 | } | 397 | } |
398 | return 1; | 398 | return 1; |
399 | default: | 399 | default: |
@@ -411,11 +411,11 @@ static int int_load(dynamic_data_ctx *ctx) | |||
411 | ctx->DYNAMIC_LIBNAME, NULL, 0)) != NULL) | 411 | ctx->DYNAMIC_LIBNAME, NULL, 0)) != NULL) |
412 | return 1; | 412 | return 1; |
413 | /* If we're not allowed to use 'dirs' or we have none, fail */ | 413 | /* If we're not allowed to use 'dirs' or we have none, fail */ |
414 | if(!ctx->dir_load || ((num = sk_num(ctx->dirs)) < 1)) | 414 | if(!ctx->dir_load || (num = sk_OPENSSL_STRING_num(ctx->dirs)) < 1) |
415 | return 0; | 415 | return 0; |
416 | for(loop = 0; loop < num; loop++) | 416 | for(loop = 0; loop < num; loop++) |
417 | { | 417 | { |
418 | const char *s = sk_value(ctx->dirs, loop); | 418 | const char *s = sk_OPENSSL_STRING_value(ctx->dirs, loop); |
419 | char *merge = DSO_merge(ctx->dynamic_dso, ctx->DYNAMIC_LIBNAME, s); | 419 | char *merge = DSO_merge(ctx->dynamic_dso, ctx->DYNAMIC_LIBNAME, s); |
420 | if(!merge) | 420 | if(!merge) |
421 | return 0; | 421 | return 0; |