diff options
| author | djm <> | 2006-06-27 05:07:03 +0000 |
|---|---|---|
| committer | djm <> | 2006-06-27 05:07:03 +0000 |
| commit | 7fe7e1ed6bcd0e342aed7c0f890962dda616aa0d (patch) | |
| tree | 224c33f66b0b932c84dda315d9ba4236bf125b1c /src/lib/libcrypto/conf | |
| parent | 3f764f48d2626a43b6eeef7652c28303269d1204 (diff) | |
| download | openbsd-7fe7e1ed6bcd0e342aed7c0f890962dda616aa0d.tar.gz openbsd-7fe7e1ed6bcd0e342aed7c0f890962dda616aa0d.tar.bz2 openbsd-7fe7e1ed6bcd0e342aed7c0f890962dda616aa0d.zip | |
resolve conflicts
Diffstat (limited to 'src/lib/libcrypto/conf')
| -rw-r--r-- | src/lib/libcrypto/conf/conf_def.c | 13 | ||||
| -rw-r--r-- | src/lib/libcrypto/conf/conf_err.c | 78 |
2 files changed, 50 insertions, 41 deletions
diff --git a/src/lib/libcrypto/conf/conf_def.c b/src/lib/libcrypto/conf/conf_def.c index b5a876ae68..2464f8ed90 100644 --- a/src/lib/libcrypto/conf/conf_def.c +++ b/src/lib/libcrypto/conf/conf_def.c | |||
| @@ -613,13 +613,13 @@ static int str_copy(CONF *conf, char *section, char **pto, char *from) | |||
| 613 | e++; | 613 | e++; |
| 614 | } | 614 | } |
| 615 | /* So at this point we have | 615 | /* So at this point we have |
| 616 | * ns which is the start of the name string which is | 616 | * np which is the start of the name string which is |
| 617 | * '\0' terminated. | 617 | * '\0' terminated. |
| 618 | * cs which is the start of the section string which is | 618 | * cp which is the start of the section string which is |
| 619 | * '\0' terminated. | 619 | * '\0' terminated. |
| 620 | * e is the 'next point after'. | 620 | * e is the 'next point after'. |
| 621 | * r and s are the chars replaced by the '\0' | 621 | * r and rr are the chars replaced by the '\0' |
| 622 | * rp and sp is where 'r' and 's' came from. | 622 | * rp and rrp is where 'r' and 'rr' came from. |
| 623 | */ | 623 | */ |
| 624 | p=_CONF_get_string(conf,cp,np); | 624 | p=_CONF_get_string(conf,cp,np); |
| 625 | if (rrp != NULL) *rrp=rr; | 625 | if (rrp != NULL) *rrp=rr; |
| @@ -638,6 +638,11 @@ static int str_copy(CONF *conf, char *section, char **pto, char *from) | |||
| 638 | points at. /RL */ | 638 | points at. /RL */ |
| 639 | len -= e-from; | 639 | len -= e-from; |
| 640 | from=e; | 640 | from=e; |
| 641 | |||
| 642 | /* In case there were no braces or parenthesis around | ||
| 643 | the variable reference, we have to put back the | ||
| 644 | character that was replaced with a '\0'. /RL */ | ||
| 645 | *rp = r; | ||
| 641 | } | 646 | } |
| 642 | else | 647 | else |
| 643 | buf->data[to++]= *(from++); | 648 | buf->data[to++]= *(from++); |
diff --git a/src/lib/libcrypto/conf/conf_err.c b/src/lib/libcrypto/conf/conf_err.c index ee07bfe9d9..f5e2ca4bf0 100644 --- a/src/lib/libcrypto/conf/conf_err.c +++ b/src/lib/libcrypto/conf/conf_err.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* crypto/conf/conf_err.c */ | 1 | /* crypto/conf/conf_err.c */ |
| 2 | /* ==================================================================== | 2 | /* ==================================================================== |
| 3 | * Copyright (c) 1999 The OpenSSL Project. All rights reserved. | 3 | * Copyright (c) 1999-2005 The OpenSSL Project. All rights reserved. |
| 4 | * | 4 | * |
| 5 | * Redistribution and use in source and binary forms, with or without | 5 | * Redistribution and use in source and binary forms, with or without |
| 6 | * modification, are permitted provided that the following conditions | 6 | * modification, are permitted provided that the following conditions |
| @@ -64,47 +64,51 @@ | |||
| 64 | 64 | ||
| 65 | /* BEGIN ERROR CODES */ | 65 | /* BEGIN ERROR CODES */ |
| 66 | #ifndef OPENSSL_NO_ERR | 66 | #ifndef OPENSSL_NO_ERR |
| 67 | |||
| 68 | #define ERR_FUNC(func) ERR_PACK(ERR_LIB_CONF,func,0) | ||
| 69 | #define ERR_REASON(reason) ERR_PACK(ERR_LIB_CONF,0,reason) | ||
| 70 | |||
| 67 | static ERR_STRING_DATA CONF_str_functs[]= | 71 | static ERR_STRING_DATA CONF_str_functs[]= |
| 68 | { | 72 | { |
| 69 | {ERR_PACK(0,CONF_F_CONF_DUMP_FP,0), "CONF_dump_fp"}, | 73 | {ERR_FUNC(CONF_F_CONF_DUMP_FP), "CONF_dump_fp"}, |
| 70 | {ERR_PACK(0,CONF_F_CONF_LOAD,0), "CONF_load"}, | 74 | {ERR_FUNC(CONF_F_CONF_LOAD), "CONF_load"}, |
| 71 | {ERR_PACK(0,CONF_F_CONF_LOAD_BIO,0), "CONF_load_bio"}, | 75 | {ERR_FUNC(CONF_F_CONF_LOAD_BIO), "CONF_load_bio"}, |
| 72 | {ERR_PACK(0,CONF_F_CONF_LOAD_FP,0), "CONF_load_fp"}, | 76 | {ERR_FUNC(CONF_F_CONF_LOAD_FP), "CONF_load_fp"}, |
| 73 | {ERR_PACK(0,CONF_F_CONF_MODULES_LOAD,0), "CONF_modules_load"}, | 77 | {ERR_FUNC(CONF_F_CONF_MODULES_LOAD), "CONF_modules_load"}, |
| 74 | {ERR_PACK(0,CONF_F_MODULE_INIT,0), "MODULE_INIT"}, | 78 | {ERR_FUNC(CONF_F_MODULE_INIT), "MODULE_INIT"}, |
| 75 | {ERR_PACK(0,CONF_F_MODULE_LOAD_DSO,0), "MODULE_LOAD_DSO"}, | 79 | {ERR_FUNC(CONF_F_MODULE_LOAD_DSO), "MODULE_LOAD_DSO"}, |
| 76 | {ERR_PACK(0,CONF_F_MODULE_RUN,0), "MODULE_RUN"}, | 80 | {ERR_FUNC(CONF_F_MODULE_RUN), "MODULE_RUN"}, |
| 77 | {ERR_PACK(0,CONF_F_NCONF_DUMP_BIO,0), "NCONF_dump_bio"}, | 81 | {ERR_FUNC(CONF_F_NCONF_DUMP_BIO), "NCONF_dump_bio"}, |
| 78 | {ERR_PACK(0,CONF_F_NCONF_DUMP_FP,0), "NCONF_dump_fp"}, | 82 | {ERR_FUNC(CONF_F_NCONF_DUMP_FP), "NCONF_dump_fp"}, |
| 79 | {ERR_PACK(0,CONF_F_NCONF_GET_NUMBER,0), "NCONF_get_number"}, | 83 | {ERR_FUNC(CONF_F_NCONF_GET_NUMBER), "NCONF_get_number"}, |
| 80 | {ERR_PACK(0,CONF_F_NCONF_GET_NUMBER_E,0), "NCONF_get_number_e"}, | 84 | {ERR_FUNC(CONF_F_NCONF_GET_NUMBER_E), "NCONF_get_number_e"}, |
| 81 | {ERR_PACK(0,CONF_F_NCONF_GET_SECTION,0), "NCONF_get_section"}, | 85 | {ERR_FUNC(CONF_F_NCONF_GET_SECTION), "NCONF_get_section"}, |
| 82 | {ERR_PACK(0,CONF_F_NCONF_GET_STRING,0), "NCONF_get_string"}, | 86 | {ERR_FUNC(CONF_F_NCONF_GET_STRING), "NCONF_get_string"}, |
| 83 | {ERR_PACK(0,CONF_F_NCONF_LOAD,0), "NCONF_load"}, | 87 | {ERR_FUNC(CONF_F_NCONF_LOAD), "NCONF_load"}, |
| 84 | {ERR_PACK(0,CONF_F_NCONF_LOAD_BIO,0), "NCONF_load_bio"}, | 88 | {ERR_FUNC(CONF_F_NCONF_LOAD_BIO), "NCONF_load_bio"}, |
| 85 | {ERR_PACK(0,CONF_F_NCONF_LOAD_FP,0), "NCONF_load_fp"}, | 89 | {ERR_FUNC(CONF_F_NCONF_LOAD_FP), "NCONF_load_fp"}, |
| 86 | {ERR_PACK(0,CONF_F_NCONF_NEW,0), "NCONF_new"}, | 90 | {ERR_FUNC(CONF_F_NCONF_NEW), "NCONF_new"}, |
| 87 | {ERR_PACK(0,CONF_F_STR_COPY,0), "STR_COPY"}, | 91 | {ERR_FUNC(CONF_F_STR_COPY), "STR_COPY"}, |
| 88 | {0,NULL} | 92 | {0,NULL} |
| 89 | }; | 93 | }; |
| 90 | 94 | ||
| 91 | static ERR_STRING_DATA CONF_str_reasons[]= | 95 | static ERR_STRING_DATA CONF_str_reasons[]= |
| 92 | { | 96 | { |
| 93 | {CONF_R_ERROR_LOADING_DSO ,"error loading dso"}, | 97 | {ERR_REASON(CONF_R_ERROR_LOADING_DSO) ,"error loading dso"}, |
| 94 | {CONF_R_MISSING_CLOSE_SQUARE_BRACKET ,"missing close square bracket"}, | 98 | {ERR_REASON(CONF_R_MISSING_CLOSE_SQUARE_BRACKET),"missing close square bracket"}, |
| 95 | {CONF_R_MISSING_EQUAL_SIGN ,"missing equal sign"}, | 99 | {ERR_REASON(CONF_R_MISSING_EQUAL_SIGN) ,"missing equal sign"}, |
| 96 | {CONF_R_MISSING_FINISH_FUNCTION ,"missing finish function"}, | 100 | {ERR_REASON(CONF_R_MISSING_FINISH_FUNCTION),"missing finish function"}, |
| 97 | {CONF_R_MISSING_INIT_FUNCTION ,"missing init function"}, | 101 | {ERR_REASON(CONF_R_MISSING_INIT_FUNCTION),"missing init function"}, |
| 98 | {CONF_R_MODULE_INITIALIZATION_ERROR ,"module initialization error"}, | 102 | {ERR_REASON(CONF_R_MODULE_INITIALIZATION_ERROR),"module initialization error"}, |
| 99 | {CONF_R_NO_CLOSE_BRACE ,"no close brace"}, | 103 | {ERR_REASON(CONF_R_NO_CLOSE_BRACE) ,"no close brace"}, |
| 100 | {CONF_R_NO_CONF ,"no conf"}, | 104 | {ERR_REASON(CONF_R_NO_CONF) ,"no conf"}, |
| 101 | {CONF_R_NO_CONF_OR_ENVIRONMENT_VARIABLE ,"no conf or environment variable"}, | 105 | {ERR_REASON(CONF_R_NO_CONF_OR_ENVIRONMENT_VARIABLE),"no conf or environment variable"}, |
| 102 | {CONF_R_NO_SECTION ,"no section"}, | 106 | {ERR_REASON(CONF_R_NO_SECTION) ,"no section"}, |
| 103 | {CONF_R_NO_SUCH_FILE ,"no such file"}, | 107 | {ERR_REASON(CONF_R_NO_SUCH_FILE) ,"no such file"}, |
| 104 | {CONF_R_NO_VALUE ,"no value"}, | 108 | {ERR_REASON(CONF_R_NO_VALUE) ,"no value"}, |
| 105 | {CONF_R_UNABLE_TO_CREATE_NEW_SECTION ,"unable to create new section"}, | 109 | {ERR_REASON(CONF_R_UNABLE_TO_CREATE_NEW_SECTION),"unable to create new section"}, |
| 106 | {CONF_R_UNKNOWN_MODULE_NAME ,"unknown module name"}, | 110 | {ERR_REASON(CONF_R_UNKNOWN_MODULE_NAME) ,"unknown module name"}, |
| 107 | {CONF_R_VARIABLE_HAS_NO_VALUE ,"variable has no value"}, | 111 | {ERR_REASON(CONF_R_VARIABLE_HAS_NO_VALUE),"variable has no value"}, |
| 108 | {0,NULL} | 112 | {0,NULL} |
| 109 | }; | 113 | }; |
| 110 | 114 | ||
| @@ -118,8 +122,8 @@ void ERR_load_CONF_strings(void) | |||
| 118 | { | 122 | { |
| 119 | init=0; | 123 | init=0; |
| 120 | #ifndef OPENSSL_NO_ERR | 124 | #ifndef OPENSSL_NO_ERR |
| 121 | ERR_load_strings(ERR_LIB_CONF,CONF_str_functs); | 125 | ERR_load_strings(0,CONF_str_functs); |
| 122 | ERR_load_strings(ERR_LIB_CONF,CONF_str_reasons); | 126 | ERR_load_strings(0,CONF_str_reasons); |
| 123 | #endif | 127 | #endif |
| 124 | 128 | ||
| 125 | } | 129 | } |
