diff options
author | Richard Levitte <levitte@openssl.org> | 2000-10-19 08:03:14 +0000 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2000-10-19 08:03:14 +0000 |
commit | c6f1787bbd8012b372158c15ac84abf75261be3e (patch) | |
tree | db303d8b4c5c773087788ffcffddd6e29099e08c /crypto/conf/conf.h | |
parent | 9bd3bd227fb9ad36f939dfde81dd843be604c452 (diff) | |
download | openssl-c6f1787bbd8012b372158c15ac84abf75261be3e.tar.gz |
NCONF_get_number() has no error checking at all. As a replacement,
NCONF_get_number_e() is defined (_e for "error checking") and is
promoted strongly. The old NCONF_get_number is kept around for
binary backward compatibility.
Diffstat (limited to 'crypto/conf/conf.h')
-rw-r--r-- | crypto/conf/conf.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/crypto/conf/conf.h b/crypto/conf/conf.h index cd40a0db21..3fded162a2 100644 --- a/crypto/conf/conf.h +++ b/crypto/conf/conf.h @@ -136,10 +136,17 @@ int NCONF_load_fp(CONF *conf, FILE *fp,long *eline); int NCONF_load_bio(CONF *conf, BIO *bp,long *eline); STACK_OF(CONF_VALUE) *NCONF_get_section(CONF *conf,char *section); char *NCONF_get_string(CONF *conf,char *group,char *name); -long NCONF_get_number(CONF *conf,char *group,char *name); +int NCONF_get_number_e(CONF *conf,char *group,char *name,long *result); int NCONF_dump_fp(CONF *conf, FILE *out); int NCONF_dump_bio(CONF *conf, BIO *out); +#if 0 /* The following function has no error checking, + and should therefore be avoided */ +long NCONF_get_number(CONF *conf,char *group,char *name); +#else +#define NCONF_get_number(c,g,n,r) NCONF_get_number_e(c,g,n,r); +#endif + /* BEGIN ERROR CODES */ /* The following lines are auto generated by the script mkerr.pl. Any changes @@ -156,6 +163,7 @@ int NCONF_dump_bio(CONF *conf, BIO *out); #define CONF_F_NCONF_DUMP_BIO 105 #define CONF_F_NCONF_DUMP_FP 106 #define CONF_F_NCONF_GET_NUMBER 107 +#define CONF_F_NCONF_GET_NUMBER_E 112 #define CONF_F_NCONF_GET_SECTION 108 #define CONF_F_NCONF_GET_STRING 109 #define CONF_F_NCONF_LOAD_BIO 110 @@ -169,6 +177,7 @@ int NCONF_dump_bio(CONF *conf, BIO *out); #define CONF_R_NO_CONF 105 #define CONF_R_NO_CONF_OR_ENVIRONMENT_VARIABLE 106 #define CONF_R_NO_SECTION 107 +#define CONF_R_NO_VALUE 108 #define CONF_R_UNABLE_TO_CREATE_NEW_SECTION 103 #define CONF_R_VARIABLE_HAS_NO_VALUE 104 |