summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/conf/conf_def.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/conf/conf_def.c')
-rw-r--r--src/lib/libcrypto/conf/conf_def.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/lib/libcrypto/conf/conf_def.c b/src/lib/libcrypto/conf/conf_def.c
index cf951320af..0b571b0394 100644
--- a/src/lib/libcrypto/conf/conf_def.c
+++ b/src/lib/libcrypto/conf/conf_def.c
@@ -213,12 +213,13 @@ static int def_load_bio(CONF *conf, BIO *in, long *line)
213 int bufnum=0,i,ii; 213 int bufnum=0,i,ii;
214 BUF_MEM *buff=NULL; 214 BUF_MEM *buff=NULL;
215 char *s,*p,*end; 215 char *s,*p,*end;
216 int again; 216 int again,n;
217 long eline=0; 217 long eline=0;
218 char btmp[DECIMAL_SIZE(eline)+1]; 218 char btmp[DECIMAL_SIZE(eline)+1];
219 CONF_VALUE *v=NULL,*tv; 219 CONF_VALUE *v=NULL,*tv;
220 CONF_VALUE *sv=NULL; 220 CONF_VALUE *sv=NULL;
221 char *section=NULL,*buf; 221 char *section=NULL,*buf;
222 STACK_OF(CONF_VALUE) *section_sk=NULL,*ts;
222 char *start,*psection,*pname; 223 char *start,*psection,*pname;
223 void *h = (void *)(conf->data); 224 void *h = (void *)(conf->data);
224 225
@@ -249,6 +250,7 @@ static int def_load_bio(CONF *conf, BIO *in, long *line)
249 CONF_R_UNABLE_TO_CREATE_NEW_SECTION); 250 CONF_R_UNABLE_TO_CREATE_NEW_SECTION);
250 goto err; 251 goto err;
251 } 252 }
253 section_sk=(STACK_OF(CONF_VALUE) *)sv->value;
252 254
253 bufnum=0; 255 bufnum=0;
254 again=0; 256 again=0;
@@ -307,6 +309,7 @@ static int def_load_bio(CONF *conf, BIO *in, long *line)
307 buf=buff->data; 309 buf=buff->data;
308 310
309 clear_comments(conf, buf); 311 clear_comments(conf, buf);
312 n=strlen(buf);
310 s=eat_ws(conf, buf); 313 s=eat_ws(conf, buf);
311 if (IS_EOF(conf,*s)) continue; /* blank line */ 314 if (IS_EOF(conf,*s)) continue; /* blank line */
312 if (*s == '[') 315 if (*s == '[')
@@ -340,6 +343,7 @@ again:
340 CONF_R_UNABLE_TO_CREATE_NEW_SECTION); 343 CONF_R_UNABLE_TO_CREATE_NEW_SECTION);
341 goto err; 344 goto err;
342 } 345 }
346 section_sk=(STACK_OF(CONF_VALUE) *)sv->value;
343 continue; 347 continue;
344 } 348 }
345 else 349 else
@@ -402,9 +406,13 @@ again:
402 CONF_R_UNABLE_TO_CREATE_NEW_SECTION); 406 CONF_R_UNABLE_TO_CREATE_NEW_SECTION);
403 goto err; 407 goto err;
404 } 408 }
409 ts=(STACK_OF(CONF_VALUE) *)tv->value;
405 } 410 }
406 else 411 else
412 {
407 tv=sv; 413 tv=sv;
414 ts=section_sk;
415 }
408#if 1 416#if 1
409 if (_CONF_add_string(conf, tv, v) == 0) 417 if (_CONF_add_string(conf, tv, v) == 0)
410 { 418 {
@@ -457,6 +465,9 @@ err:
457 465
458static void clear_comments(CONF *conf, char *p) 466static void clear_comments(CONF *conf, char *p)
459 { 467 {
468 char *to;
469
470 to=p;
460 for (;;) 471 for (;;)
461 { 472 {
462 if (IS_FCOMMENT(conf,*p)) 473 if (IS_FCOMMENT(conf,*p))