summaryrefslogtreecommitdiffstats
path: root/crypto/conf/conf_api.c
diff options
context:
space:
mode:
authorBen Laurie <ben@openssl.org>2002-01-18 16:51:05 +0000
committerBen Laurie <ben@openssl.org>2002-01-18 16:51:05 +0000
commit9dd5ae65533ec43e66efe66e1bbcddce4cb05509 (patch)
tree7150828e2bcb1ac5c92435ddc3dee259facd72e7 /crypto/conf/conf_api.c
parente1e876072d813ac55a4a0b2c17ff55a0b27d1689 (diff)
Constification, add config to /dev/crypto.
Diffstat (limited to 'crypto/conf/conf_api.c')
-rw-r--r--crypto/conf/conf_api.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/crypto/conf/conf_api.c b/crypto/conf/conf_api.c
index 9615df5873..0032baa711 100644
--- a/crypto/conf/conf_api.c
+++ b/crypto/conf/conf_api.c
@@ -81,19 +81,20 @@ static unsigned long hash(const void *v_void);
static int cmp_conf(const void *a_void,const void *b_void);
/* Up until OpenSSL 0.9.5a, this was get_section */
-CONF_VALUE *_CONF_get_section(CONF *conf, char *section)
+CONF_VALUE *_CONF_get_section(const CONF *conf, const char *section)
{
CONF_VALUE *v,vv;
if ((conf == NULL) || (section == NULL)) return(NULL);
vv.name=NULL;
- vv.section=section;
+ vv.section=(char *)section;
v=(CONF_VALUE *)lh_retrieve(conf->data,&vv);
return(v);
}
/* Up until OpenSSL 0.9.5a, this was CONF_get_section */
-STACK_OF(CONF_VALUE) *_CONF_get_section_values(CONF *conf, char *section)
+STACK_OF(CONF_VALUE) *_CONF_get_section_values(const CONF *conf,
+ const char *section)
{
CONF_VALUE *v;
@@ -128,7 +129,7 @@ int _CONF_add_string(CONF *conf, CONF_VALUE *section, CONF_VALUE *value)
return 1;
}
-char *_CONF_get_string(CONF *conf, char *section, char *name)
+char *_CONF_get_string(const CONF *conf, const char *section, const char *name)
{
CONF_VALUE *v,vv;
char *p;
@@ -138,8 +139,8 @@ char *_CONF_get_string(CONF *conf, char *section, char *name)
{
if (section != NULL)
{
- vv.name=name;
- vv.section=section;
+ vv.name=(char *)name;
+ vv.section=(char *)section;
v=(CONF_VALUE *)lh_retrieve(conf->data,&vv);
if (v != NULL) return(v->value);
if (strcmp(section,"ENV") == 0)
@@ -149,7 +150,7 @@ char *_CONF_get_string(CONF *conf, char *section, char *name)
}
}
vv.section="default";
- vv.name=name;
+ vv.name=(char *)name;
v=(CONF_VALUE *)lh_retrieve(conf->data,&vv);
if (v != NULL)
return(v->value);
@@ -273,7 +274,7 @@ static int cmp_conf(const void *a_void,const void *b_void)
}
/* Up until OpenSSL 0.9.5a, this was new_section */
-CONF_VALUE *_CONF_new_section(CONF *conf, char *section)
+CONF_VALUE *_CONF_new_section(CONF *conf, const char *section)
{
STACK *sk=NULL;
int ok=0,i;