mirror of
https://github.com/openssl/openssl.git
synced 2025-01-10 12:03:34 +08:00
Rename internal function name_cmp() to v3_name_cmp()
"name_cmp" caused a clash when linking with the static libcrypto. The slight rename is better than nothing, as v3_ is an already existing prefix. Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> (Merged from https://github.com/openssl/openssl/pull/9979)
This commit is contained in:
parent
4dc0d81a1a
commit
5f5edd7d3e
@ -7,7 +7,7 @@
|
||||
* https://www.openssl.org/source/license.html
|
||||
*/
|
||||
|
||||
int name_cmp(const char *name, const char *cmp);
|
||||
int v3_name_cmp(const char *name, const char *cmp);
|
||||
|
||||
extern const X509V3_EXT_METHOD v3_bcons, v3_nscert, v3_key_usage, v3_ext_ku;
|
||||
extern const X509V3_EXT_METHOD v3_pkey_usage_period, v3_sxnet, v3_info, v3_sinfo;
|
||||
|
@ -906,14 +906,14 @@ static void *v2i_IPAddrBlocks(const struct v3_ext_method *method,
|
||||
const char *addr_chars = NULL;
|
||||
int prefixlen, i1, i2, delim, length;
|
||||
|
||||
if (!name_cmp(val->name, "IPv4")) {
|
||||
if (!v3_name_cmp(val->name, "IPv4")) {
|
||||
afi = IANA_AFI_IPV4;
|
||||
} else if (!name_cmp(val->name, "IPv6")) {
|
||||
} else if (!v3_name_cmp(val->name, "IPv6")) {
|
||||
afi = IANA_AFI_IPV6;
|
||||
} else if (!name_cmp(val->name, "IPv4-SAFI")) {
|
||||
} else if (!v3_name_cmp(val->name, "IPv4-SAFI")) {
|
||||
afi = IANA_AFI_IPV4;
|
||||
safi = &safi_;
|
||||
} else if (!name_cmp(val->name, "IPv6-SAFI")) {
|
||||
} else if (!v3_name_cmp(val->name, "IPv6-SAFI")) {
|
||||
afi = IANA_AFI_IPV6;
|
||||
safi = &safi_;
|
||||
} else {
|
||||
|
@ -252,7 +252,7 @@ static GENERAL_NAMES *v2i_issuer_alt(X509V3_EXT_METHOD *method,
|
||||
for (i = 0; i < num; i++) {
|
||||
CONF_VALUE *cnf = sk_CONF_VALUE_value(nval, i);
|
||||
|
||||
if (!name_cmp(cnf->name, "issuer")
|
||||
if (!v3_name_cmp(cnf->name, "issuer")
|
||||
&& cnf->value && strcmp(cnf->value, "copy") == 0) {
|
||||
if (!copy_issuer(ctx, gens))
|
||||
goto err;
|
||||
@ -331,11 +331,11 @@ static GENERAL_NAMES *v2i_subject_alt(X509V3_EXT_METHOD *method,
|
||||
|
||||
for (i = 0; i < num; i++) {
|
||||
cnf = sk_CONF_VALUE_value(nval, i);
|
||||
if (!name_cmp(cnf->name, "email")
|
||||
if (!v3_name_cmp(cnf->name, "email")
|
||||
&& cnf->value && strcmp(cnf->value, "copy") == 0) {
|
||||
if (!copy_email(ctx, gens, 0))
|
||||
goto err;
|
||||
} else if (!name_cmp(cnf->name, "email")
|
||||
} else if (!v3_name_cmp(cnf->name, "email")
|
||||
&& cnf->value && strcmp(cnf->value, "move") == 0) {
|
||||
if (!copy_email(ctx, gens, 1))
|
||||
goto err;
|
||||
@ -551,19 +551,19 @@ GENERAL_NAME *v2i_GENERAL_NAME_ex(GENERAL_NAME *out,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (!name_cmp(name, "email"))
|
||||
if (!v3_name_cmp(name, "email"))
|
||||
type = GEN_EMAIL;
|
||||
else if (!name_cmp(name, "URI"))
|
||||
else if (!v3_name_cmp(name, "URI"))
|
||||
type = GEN_URI;
|
||||
else if (!name_cmp(name, "DNS"))
|
||||
else if (!v3_name_cmp(name, "DNS"))
|
||||
type = GEN_DNS;
|
||||
else if (!name_cmp(name, "RID"))
|
||||
else if (!v3_name_cmp(name, "RID"))
|
||||
type = GEN_RID;
|
||||
else if (!name_cmp(name, "IP"))
|
||||
else if (!v3_name_cmp(name, "IP"))
|
||||
type = GEN_IPADD;
|
||||
else if (!name_cmp(name, "dirName"))
|
||||
else if (!v3_name_cmp(name, "dirName"))
|
||||
type = GEN_DIRNAME;
|
||||
else if (!name_cmp(name, "otherName"))
|
||||
else if (!v3_name_cmp(name, "otherName"))
|
||||
type = GEN_OTHERNAME;
|
||||
else {
|
||||
X509V3err(X509V3_F_V2I_GENERAL_NAME_EX, X509V3_R_UNSUPPORTED_OPTION);
|
||||
|
@ -534,9 +534,9 @@ static void *v2i_ASIdentifiers(const struct v3_ext_method *method,
|
||||
/*
|
||||
* Figure out whether this is an AS or an RDI.
|
||||
*/
|
||||
if (!name_cmp(val->name, "AS")) {
|
||||
if (!v3_name_cmp(val->name, "AS")) {
|
||||
which = V3_ASID_ASNUM;
|
||||
} else if (!name_cmp(val->name, "RDI")) {
|
||||
} else if (!v3_name_cmp(val->name, "RDI")) {
|
||||
which = V3_ASID_RDI;
|
||||
} else {
|
||||
X509V3err(X509V3_F_V2I_ASIDENTIFIERS,
|
||||
|
@ -187,7 +187,7 @@ static POLICYINFO *policy_section(X509V3_CTX *ctx,
|
||||
}
|
||||
pol->policyid = pobj;
|
||||
|
||||
} else if (!name_cmp(cnf->name, "CPS")) {
|
||||
} else if (!v3_name_cmp(cnf->name, "CPS")) {
|
||||
if (pol->qualifiers == NULL)
|
||||
pol->qualifiers = sk_POLICYQUALINFO_new_null();
|
||||
if ((qual = POLICYQUALINFO_new()) == NULL)
|
||||
@ -203,7 +203,7 @@ static POLICYINFO *policy_section(X509V3_CTX *ctx,
|
||||
if (!ASN1_STRING_set(qual->d.cpsuri, cnf->value,
|
||||
strlen(cnf->value)))
|
||||
goto merr;
|
||||
} else if (!name_cmp(cnf->name, "userNotice")) {
|
||||
} else if (!v3_name_cmp(cnf->name, "userNotice")) {
|
||||
STACK_OF(CONF_VALUE) *unot;
|
||||
if (*cnf->value != '@') {
|
||||
X509V3err(X509V3_F_POLICY_SECTION,
|
||||
|
@ -397,7 +397,7 @@ static char *strip_spaces(char *name)
|
||||
* V2I name comparison function: returns zero if 'name' matches cmp or cmp.*
|
||||
*/
|
||||
|
||||
int name_cmp(const char *name, const char *cmp)
|
||||
int v3_name_cmp(const char *name, const char *cmp)
|
||||
{
|
||||
int len, ret;
|
||||
char c;
|
||||
|
Loading…
Reference in New Issue
Block a user