diff options
author | Richard Levitte <levitte@openssl.org> | 2019-10-14 16:28:29 +0200 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2019-10-17 09:16:45 +0200 |
commit | 5f5edd7d3eb20c39177b9fa6422f1db57634e9e3 (patch) | |
tree | 15e4766d532166cc4c5ef9d4bce1acddf1dcb3d0 /crypto/x509 | |
parent | 4dc0d81a1a7b58a0a61102d875eb2cb712fe6a4b (diff) |
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)
Diffstat (limited to 'crypto/x509')
-rw-r--r-- | crypto/x509/ext_dat.h | 2 | ||||
-rw-r--r-- | crypto/x509/v3_addr.c | 8 | ||||
-rw-r--r-- | crypto/x509/v3_alt.c | 20 | ||||
-rw-r--r-- | crypto/x509/v3_asid.c | 4 | ||||
-rw-r--r-- | crypto/x509/v3_cpols.c | 4 | ||||
-rw-r--r-- | crypto/x509/v3_utl.c | 2 |
6 files changed, 20 insertions, 20 deletions
diff --git a/crypto/x509/ext_dat.h b/crypto/x509/ext_dat.h index aa6fa79774..f48fa1d3f1 100644 --- a/crypto/x509/ext_dat.h +++ b/crypto/x509/ext_dat.h @@ -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; diff --git a/crypto/x509/v3_addr.c b/crypto/x509/v3_addr.c index a33dd9990d..766c5bc106 100644 --- a/crypto/x509/v3_addr.c +++ b/crypto/x509/v3_addr.c @@ -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 { diff --git a/crypto/x509/v3_alt.c b/crypto/x509/v3_alt.c index af1cd61aee..5d1ece71cb 100644 --- a/crypto/x509/v3_alt.c +++ b/crypto/x509/v3_alt.c @@ -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); diff --git a/crypto/x509/v3_asid.c b/crypto/x509/v3_asid.c index dfd48f7331..6cb5cd5546 100644 --- a/crypto/x509/v3_asid.c +++ b/crypto/x509/v3_asid.c @@ -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, diff --git a/crypto/x509/v3_cpols.c b/crypto/x509/v3_cpols.c index e70ab61d50..470088c90a 100644 --- a/crypto/x509/v3_cpols.c +++ b/crypto/x509/v3_cpols.c @@ -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, diff --git a/crypto/x509/v3_utl.c b/crypto/x509/v3_utl.c index 50fa404996..19b552c3a3 100644 --- a/crypto/x509/v3_utl.c +++ b/crypto/x509/v3_utl.c @@ -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; |