summaryrefslogtreecommitdiffstats
path: root/crypto/x509v3/v3_utl.c
diff options
context:
space:
mode:
authorRich Salz <rsalz@akamai.com>2015-12-16 16:12:24 -0500
committerRich Salz <rsalz@openssl.org>2015-12-16 16:14:49 -0500
commit7644a9aef8932ed4d1c3f25ed776c997702982be (patch)
treed8f1e7fca20ad12683a1e2e52c92b6999ada23a6 /crypto/x509v3/v3_utl.c
parente4cf866322a4549c55153f9f135f9dadf4d3fc31 (diff)
Rename some BUF_xxx to OPENSSL_xxx
Rename BUF_{strdup,strlcat,strlcpy,memdup,strndup,strnlen} to OPENSSL_{strdup,strlcat,strlcpy,memdup,strndup,strnlen} Add #define's for the old names. Add CRYPTO_{memdup,strndup}, called by OPENSSL_{memdup,strndup} macros. Reviewed-by: Tim Hudson <tjh@openssl.org>
Diffstat (limited to 'crypto/x509v3/v3_utl.c')
-rw-r--r--crypto/x509v3/v3_utl.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/crypto/x509v3/v3_utl.c b/crypto/x509v3/v3_utl.c
index 8481749a1f..c9e74f4c4b 100644
--- a/crypto/x509v3/v3_utl.c
+++ b/crypto/x509v3/v3_utl.c
@@ -86,9 +86,9 @@ int X509V3_add_value(const char *name, const char *value,
CONF_VALUE *vtmp = NULL;
char *tname = NULL, *tvalue = NULL;
- if (name && (tname = BUF_strdup(name)) == NULL)
+ if (name && (tname = OPENSSL_strdup(name)) == NULL)
goto err;
- if (value && (tvalue = BUF_strdup(value)) == NULL)
+ if (value && (tvalue = OPENSSL_strdup(value)) == NULL)
goto err;
if ((vtmp = OPENSSL_malloc(sizeof(*vtmp))) == NULL)
goto err;
@@ -296,7 +296,7 @@ STACK_OF(CONF_VALUE) *X509V3_parse_list(const char *line)
char *linebuf;
int state;
/* We are going to modify the line so copy it first */
- linebuf = BUF_strdup(line);
+ linebuf = OPENSSL_strdup(line);
if (linebuf == NULL) {
X509V3err(X509V3_F_X509V3_PARSE_LIST, ERR_R_MALLOC_FAILURE);
goto err;
@@ -617,7 +617,7 @@ static int append_ia5(STACK_OF(OPENSSL_STRING) **sk, ASN1_IA5STRING *email)
/* Don't add duplicates */
if (sk_OPENSSL_STRING_find(*sk, (char *)email->data) != -1)
return 1;
- emtmp = BUF_strdup((char *)email->data);
+ emtmp = OPENSSL_strdup((char *)email->data);
if (emtmp == NULL || !sk_OPENSSL_STRING_push(*sk, emtmp)) {
X509_email_free(*sk);
*sk = NULL;
@@ -899,7 +899,7 @@ static int do_check_string(ASN1_STRING *a, int cmp_type, equal_fn equal,
else if (a->length == (int)blen && !memcmp(a->data, b, blen))
rv = 1;
if (rv > 0 && peername)
- *peername = BUF_strndup((char *)a->data, a->length);
+ *peername = OPENSSL_strndup((char *)a->data, a->length);
} else {
int astrlen;
unsigned char *astr;
@@ -913,7 +913,7 @@ static int do_check_string(ASN1_STRING *a, int cmp_type, equal_fn equal,
}
rv = equal(astr, astrlen, (unsigned char *)b, blen, flags);
if (rv > 0 && peername)
- *peername = BUF_strndup((char *)astr, astrlen);
+ *peername = OPENSSL_strndup((char *)astr, astrlen);
OPENSSL_free(astr);
}
return rv;
@@ -1099,7 +1099,7 @@ ASN1_OCTET_STRING *a2i_IPADDRESS_NC(const char *ipasc)
p = strchr(ipasc, '/');
if (!p)
return NULL;
- iptmp = BUF_strdup(ipasc);
+ iptmp = OPENSSL_strdup(ipasc);
if (!iptmp)
return NULL;
p = iptmp + (p - ipasc);