summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/conf/conf_def.c
diff options
context:
space:
mode:
authordjm <>2008-09-06 12:17:54 +0000
committerdjm <>2008-09-06 12:17:54 +0000
commit38ce604e3cc97706b876b0525ddff0121115456d (patch)
tree7ccc28afe1789ea3dbedf72365f955d5b8e105b5 /src/lib/libcrypto/conf/conf_def.c
parent12867252827c8efaa8ddd1fa3b3d6e321e2bcdef (diff)
downloadopenbsd-38ce604e3cc97706b876b0525ddff0121115456d.tar.gz
openbsd-38ce604e3cc97706b876b0525ddff0121115456d.tar.bz2
openbsd-38ce604e3cc97706b876b0525ddff0121115456d.zip
resolve conflicts
Diffstat (limited to 'src/lib/libcrypto/conf/conf_def.c')
-rw-r--r--src/lib/libcrypto/conf/conf_def.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/src/lib/libcrypto/conf/conf_def.c b/src/lib/libcrypto/conf/conf_def.c
index 2464f8ed90..d8bce8732a 100644
--- a/src/lib/libcrypto/conf/conf_def.c
+++ b/src/lib/libcrypto/conf/conf_def.c
@@ -60,6 +60,7 @@
60 60
61#include <stdio.h> 61#include <stdio.h>
62#include <string.h> 62#include <string.h>
63#include "cryptlib.h"
63#include <openssl/stack.h> 64#include <openssl/stack.h>
64#include <openssl/lhash.h> 65#include <openssl/lhash.h>
65#include <openssl/conf.h> 66#include <openssl/conf.h>
@@ -67,7 +68,6 @@
67#include "conf_def.h" 68#include "conf_def.h"
68#include <openssl/buffer.h> 69#include <openssl/buffer.h>
69#include <openssl/err.h> 70#include <openssl/err.h>
70#include "cryptlib.h"
71 71
72static char *eat_ws(CONF *conf, char *p); 72static char *eat_ws(CONF *conf, char *p);
73static char *eat_alpha_numeric(CONF *conf, char *p); 73static char *eat_alpha_numeric(CONF *conf, char *p);
@@ -88,7 +88,7 @@ static int def_dump(const CONF *conf, BIO *bp);
88static int def_is_number(const CONF *conf, char c); 88static int def_is_number(const CONF *conf, char c);
89static int def_to_int(const CONF *conf, char c); 89static int def_to_int(const CONF *conf, char c);
90 90
91const char *CONF_def_version="CONF_def" OPENSSL_VERSION_PTEXT; 91const char CONF_def_version[]="CONF_def" OPENSSL_VERSION_PTEXT;
92 92
93static CONF_METHOD default_method = { 93static CONF_METHOD default_method = {
94 "OpenSSL default", 94 "OpenSSL default",
@@ -194,9 +194,9 @@ static int def_load(CONF *conf, const char *name, long *line)
194 if (in == NULL) 194 if (in == NULL)
195 { 195 {
196 if (ERR_GET_REASON(ERR_peek_last_error()) == BIO_R_NO_SUCH_FILE) 196 if (ERR_GET_REASON(ERR_peek_last_error()) == BIO_R_NO_SUCH_FILE)
197 CONFerr(CONF_F_CONF_LOAD,CONF_R_NO_SUCH_FILE); 197 CONFerr(CONF_F_DEF_LOAD,CONF_R_NO_SUCH_FILE);
198 else 198 else
199 CONFerr(CONF_F_CONF_LOAD,ERR_R_SYS_LIB); 199 CONFerr(CONF_F_DEF_LOAD,ERR_R_SYS_LIB);
200 return 0; 200 return 0;
201 } 201 }
202 202
@@ -225,28 +225,28 @@ static int def_load_bio(CONF *conf, BIO *in, long *line)
225 225
226 if ((buff=BUF_MEM_new()) == NULL) 226 if ((buff=BUF_MEM_new()) == NULL)
227 { 227 {
228 CONFerr(CONF_F_CONF_LOAD_BIO,ERR_R_BUF_LIB); 228 CONFerr(CONF_F_DEF_LOAD_BIO,ERR_R_BUF_LIB);
229 goto err; 229 goto err;
230 } 230 }
231 231
232 section=(char *)OPENSSL_malloc(10); 232 section=(char *)OPENSSL_malloc(10);
233 if (section == NULL) 233 if (section == NULL)
234 { 234 {
235 CONFerr(CONF_F_CONF_LOAD_BIO,ERR_R_MALLOC_FAILURE); 235 CONFerr(CONF_F_DEF_LOAD_BIO,ERR_R_MALLOC_FAILURE);
236 goto err; 236 goto err;
237 } 237 }
238 BUF_strlcpy(section,"default",10); 238 BUF_strlcpy(section,"default",10);
239 239
240 if (_CONF_new_data(conf) == 0) 240 if (_CONF_new_data(conf) == 0)
241 { 241 {
242 CONFerr(CONF_F_CONF_LOAD_BIO,ERR_R_MALLOC_FAILURE); 242 CONFerr(CONF_F_DEF_LOAD_BIO,ERR_R_MALLOC_FAILURE);
243 goto err; 243 goto err;
244 } 244 }
245 245
246 sv=_CONF_new_section(conf,section); 246 sv=_CONF_new_section(conf,section);
247 if (sv == NULL) 247 if (sv == NULL)
248 { 248 {
249 CONFerr(CONF_F_CONF_LOAD_BIO, 249 CONFerr(CONF_F_DEF_LOAD_BIO,
250 CONF_R_UNABLE_TO_CREATE_NEW_SECTION); 250 CONF_R_UNABLE_TO_CREATE_NEW_SECTION);
251 goto err; 251 goto err;
252 } 252 }
@@ -258,7 +258,7 @@ static int def_load_bio(CONF *conf, BIO *in, long *line)
258 { 258 {
259 if (!BUF_MEM_grow(buff,bufnum+CONFBUFSIZE)) 259 if (!BUF_MEM_grow(buff,bufnum+CONFBUFSIZE))
260 { 260 {
261 CONFerr(CONF_F_CONF_LOAD_BIO,ERR_R_BUF_LIB); 261 CONFerr(CONF_F_DEF_LOAD_BIO,ERR_R_BUF_LIB);
262 goto err; 262 goto err;
263 } 263 }
264 p= &(buff->data[bufnum]); 264 p= &(buff->data[bufnum]);
@@ -329,7 +329,7 @@ again:
329 ss=p; 329 ss=p;
330 goto again; 330 goto again;
331 } 331 }
332 CONFerr(CONF_F_CONF_LOAD_BIO, 332 CONFerr(CONF_F_DEF_LOAD_BIO,
333 CONF_R_MISSING_CLOSE_SQUARE_BRACKET); 333 CONF_R_MISSING_CLOSE_SQUARE_BRACKET);
334 goto err; 334 goto err;
335 } 335 }
@@ -339,7 +339,7 @@ again:
339 sv=_CONF_new_section(conf,section); 339 sv=_CONF_new_section(conf,section);
340 if (sv == NULL) 340 if (sv == NULL)
341 { 341 {
342 CONFerr(CONF_F_CONF_LOAD_BIO, 342 CONFerr(CONF_F_DEF_LOAD_BIO,
343 CONF_R_UNABLE_TO_CREATE_NEW_SECTION); 343 CONF_R_UNABLE_TO_CREATE_NEW_SECTION);
344 goto err; 344 goto err;
345 } 345 }
@@ -362,7 +362,7 @@ again:
362 p=eat_ws(conf, end); 362 p=eat_ws(conf, end);
363 if (*p != '=') 363 if (*p != '=')
364 { 364 {
365 CONFerr(CONF_F_CONF_LOAD_BIO, 365 CONFerr(CONF_F_DEF_LOAD_BIO,
366 CONF_R_MISSING_EQUAL_SIGN); 366 CONF_R_MISSING_EQUAL_SIGN);
367 goto err; 367 goto err;
368 } 368 }
@@ -379,7 +379,7 @@ again:
379 379
380 if (!(v=(CONF_VALUE *)OPENSSL_malloc(sizeof(CONF_VALUE)))) 380 if (!(v=(CONF_VALUE *)OPENSSL_malloc(sizeof(CONF_VALUE))))
381 { 381 {
382 CONFerr(CONF_F_CONF_LOAD_BIO, 382 CONFerr(CONF_F_DEF_LOAD_BIO,
383 ERR_R_MALLOC_FAILURE); 383 ERR_R_MALLOC_FAILURE);
384 goto err; 384 goto err;
385 } 385 }
@@ -388,7 +388,7 @@ again:
388 v->value=NULL; 388 v->value=NULL;
389 if (v->name == NULL) 389 if (v->name == NULL)
390 { 390 {
391 CONFerr(CONF_F_CONF_LOAD_BIO, 391 CONFerr(CONF_F_DEF_LOAD_BIO,
392 ERR_R_MALLOC_FAILURE); 392 ERR_R_MALLOC_FAILURE);
393 goto err; 393 goto err;
394 } 394 }
@@ -402,7 +402,7 @@ again:
402 tv=_CONF_new_section(conf,psection); 402 tv=_CONF_new_section(conf,psection);
403 if (tv == NULL) 403 if (tv == NULL)
404 { 404 {
405 CONFerr(CONF_F_CONF_LOAD_BIO, 405 CONFerr(CONF_F_DEF_LOAD_BIO,
406 CONF_R_UNABLE_TO_CREATE_NEW_SECTION); 406 CONF_R_UNABLE_TO_CREATE_NEW_SECTION);
407 goto err; 407 goto err;
408 } 408 }
@@ -416,7 +416,7 @@ again:
416#if 1 416#if 1
417 if (_CONF_add_string(conf, tv, v) == 0) 417 if (_CONF_add_string(conf, tv, v) == 0)
418 { 418 {
419 CONFerr(CONF_F_CONF_LOAD_BIO, 419 CONFerr(CONF_F_DEF_LOAD_BIO,
420 ERR_R_MALLOC_FAILURE); 420 ERR_R_MALLOC_FAILURE);
421 goto err; 421 goto err;
422 } 422 }
@@ -424,7 +424,7 @@ again:
424 v->section=tv->section; 424 v->section=tv->section;
425 if (!sk_CONF_VALUE_push(ts,v)) 425 if (!sk_CONF_VALUE_push(ts,v))
426 { 426 {
427 CONFerr(CONF_F_CONF_LOAD_BIO, 427 CONFerr(CONF_F_DEF_LOAD_BIO,
428 ERR_R_MALLOC_FAILURE); 428 ERR_R_MALLOC_FAILURE);
429 goto err; 429 goto err;
430 } 430 }
@@ -629,7 +629,7 @@ static int str_copy(CONF *conf, char *section, char **pto, char *from)
629 CONFerr(CONF_F_STR_COPY,CONF_R_VARIABLE_HAS_NO_VALUE); 629 CONFerr(CONF_F_STR_COPY,CONF_R_VARIABLE_HAS_NO_VALUE);
630 goto err; 630 goto err;
631 } 631 }
632 BUF_MEM_grow_clean(buf,(strlen(p)+len-(e-from))); 632 BUF_MEM_grow_clean(buf,(strlen(p)+buf->length-(e-from)));
633 while (*p) 633 while (*p)
634 buf->data[to++]= *(p++); 634 buf->data[to++]= *(p++);
635 635