diff options
author | Daniel Stenberg <daniel@haxx.se> | 2016-09-30 17:15:05 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2016-10-31 08:46:35 +0100 |
commit | 502acba2af821391b85a2cd4ac7b91ad8e9d4180 (patch) | |
tree | e219be1178db413bffd92033e965c1e1075c4702 /lib/x509asn1.c | |
parent | 1833a45dde4d27febfce42813699533b1ae993d1 (diff) |
strcasecompare: is the new name for strequal()
... to make it less likely that we forget that the function actually
does case insentive compares. Also replaced several invokes of the
function with a plain strcmp when case sensitivity is not an issue (like
comparing with "-").
Diffstat (limited to 'lib/x509asn1.c')
-rw-r--r-- | lib/x509asn1.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/x509asn1.c b/lib/x509asn1.c index e17bcd92d..0559cb6c4 100644 --- a/lib/x509asn1.c +++ b/lib/x509asn1.c @@ -178,7 +178,7 @@ static const curl_OID * searchOID(const char * oid) Return the table entry pointer or NULL if not found. */ for(op = OIDtable; op->numoid; op++) - if(!strcmp(op->numoid, oid) || curl_strequal(op->textoid, oid)) + if(!strcmp(op->numoid, oid) || strcasecompare(op->textoid, oid)) return op; return (const curl_OID *) NULL; @@ -817,7 +817,7 @@ static void do_pubkey(struct Curl_easy * data, int certnum, /* Get the public key (single element). */ Curl_getASN1Element(&pk, pubkey->beg + 1, pubkey->end); - if(curl_strequal(algo, "rsaEncryption")) { + if(strcasecompare(algo, "rsaEncryption")) { p = Curl_getASN1Element(&elem, pk.beg, pk.end); /* Compute key length. */ for(q = elem.beg; !*q && q < elem.end; q++) @@ -842,7 +842,7 @@ static void do_pubkey(struct Curl_easy * data, int certnum, Curl_getASN1Element(&elem, p, pk.end); do_pubkey_field(data, certnum, "rsa(e)", &elem); } - else if(curl_strequal(algo, "dsa")) { + else if(strcasecompare(algo, "dsa")) { p = Curl_getASN1Element(&elem, param->beg, param->end); do_pubkey_field(data, certnum, "dsa(p)", &elem); p = Curl_getASN1Element(&elem, p, param->end); @@ -851,7 +851,7 @@ static void do_pubkey(struct Curl_easy * data, int certnum, do_pubkey_field(data, certnum, "dsa(g)", &elem); do_pubkey_field(data, certnum, "dsa(pub_key)", &pk); } - else if(curl_strequal(algo, "dhpublicnumber")) { + else if(strcasecompare(algo, "dhpublicnumber")) { p = Curl_getASN1Element(&elem, param->beg, param->end); do_pubkey_field(data, certnum, "dh(p)", &elem); Curl_getASN1Element(&elem, param->beg, param->end); @@ -859,7 +859,7 @@ static void do_pubkey(struct Curl_easy * data, int certnum, do_pubkey_field(data, certnum, "dh(pub_key)", &pk); } #if 0 /* Patent-encumbered. */ - else if(curl_strequal(algo, "ecPublicKey")) { + else if(strcasecompare(algo, "ecPublicKey")) { /* Left TODO. */ } #endif |