Commit fa3a8442 authored by FdaSilvaYY's avatar FdaSilvaYY Committed by Rich Salz
Browse files

Constify some input buffers in asn1

parent dc423f89
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -18,7 +18,7 @@

/* Simple ASN1 OID module: add all objects in a given section */

static int do_create(char *value, char *name);
static int do_create(const char *value, const char *name);

static int oid_module_init(CONF_IMODULE *md, const CONF *cnf)
{
@@ -57,11 +57,12 @@ void ASN1_add_oid_module(void)
 * shortname = some long name, 1.2.3.4
 */

static int do_create(char *value, char *name)
static int do_create(const char *value, const char *name)
{
    int nid;
    ASN1_OBJECT *oid;
    char *ln, *ostr, *p, *lntmp;
    const char *ln, *ostr, *p;
    char *lntmp;
    p = strrchr(value, ',');
    if (!p) {
        ln = name;
+2 −2
Original line number Diff line number Diff line
@@ -16,7 +16,7 @@

/* Multi string module: add table entries from a given section */

static int do_tcreate(char *value, char *name);
static int do_tcreate(const char *value, const char *name);

static int stbl_module_init(CONF_IMODULE *md, const CONF *cnf)
{
@@ -55,7 +55,7 @@ void ASN1_add_stable_module(void)
 * n1:v1, n2:v2,... where name is "min", "max", "mask" or "flags".
 */

static int do_tcreate(char *value, char *name)
static int do_tcreate(const char *value, const char *name)
{
    char *eptr;
    int nid, i, rv = 0;
+2 −2
Original line number Diff line number Diff line
@@ -30,7 +30,7 @@ int ASN1_BIT_STRING_name_print(BIO *out, ASN1_BIT_STRING *bs,
    return 1;
}

int ASN1_BIT_STRING_set_asc(ASN1_BIT_STRING *bs, char *name, int value,
int ASN1_BIT_STRING_set_asc(ASN1_BIT_STRING *bs, const char *name, int value,
                            BIT_STRING_BITNAME *tbl)
{
    int bitnum;
@@ -44,7 +44,7 @@ int ASN1_BIT_STRING_set_asc(ASN1_BIT_STRING *bs, char *name, int value,
    return 1;
}

int ASN1_BIT_STRING_num_asc(char *name, BIT_STRING_BITNAME *tbl)
int ASN1_BIT_STRING_num_asc(const char *name, BIT_STRING_BITNAME *tbl)
{
    BIT_STRING_BITNAME *bnam;
    for (bnam = tbl; bnam->lname; bnam++) {
+2 −2
Original line number Diff line number Diff line
@@ -553,8 +553,8 @@ int ASN1_BIT_STRING_check(const ASN1_BIT_STRING *a,

int ASN1_BIT_STRING_name_print(BIO *out, ASN1_BIT_STRING *bs,
                               BIT_STRING_BITNAME *tbl, int indent);
int ASN1_BIT_STRING_num_asc(char *name, BIT_STRING_BITNAME *tbl);
int ASN1_BIT_STRING_set_asc(ASN1_BIT_STRING *bs, char *name, int value,
int ASN1_BIT_STRING_num_asc(const char *name, BIT_STRING_BITNAME *tbl);
int ASN1_BIT_STRING_set_asc(ASN1_BIT_STRING *bs, const char *name, int value,
                            BIT_STRING_BITNAME *tbl);

DECLARE_ASN1_FUNCTIONS(ASN1_INTEGER)