mirror of
https://github.com/curl/curl.git
synced 2026-07-23 20:37:16 +03:00
lib: drop two interim macros in favor of native libcurl API calls
Drop `strcasecompare` and `strncasecompare` in favor of libcurl API calls `curl_strequal` and `curl_strnequal` respectively. Also drop unnecessary `strcase.h` includes. Include `curl/curl.h` instead where it wasn't included before. Closes #17772
This commit is contained in:
parent
d553f7e9f0
commit
a3787f98ac
54 changed files with 223 additions and 260 deletions
|
|
@ -58,7 +58,6 @@
|
|||
#include "../speedcheck.h"
|
||||
#include "../getinfo.h"
|
||||
#include "../strdup.h"
|
||||
#include "../strcase.h"
|
||||
#include "../vtls/vtls.h"
|
||||
#include "../cfilters.h"
|
||||
#include "../connect.h"
|
||||
|
|
@ -363,7 +362,7 @@ static int myssh_is_known(struct Curl_easy *data, struct ssh_conn *sshc)
|
|||
|
||||
infof(data, "SSH MD5 fingerprint: %s", md5buffer);
|
||||
|
||||
if(!strcasecompare(md5buffer, pubkey_md5)) {
|
||||
if(!curl_strequal(md5buffer, pubkey_md5)) {
|
||||
failf(data,
|
||||
"Denied establishing ssh session: mismatch md5 fingerprint. "
|
||||
"Remote %s is not equal to %s", md5buffer, pubkey_md5);
|
||||
|
|
@ -1584,7 +1583,7 @@ static int myssh_in_SFTP_QUOTE(struct Curl_easy *data,
|
|||
sshc->acceptfail = TRUE;
|
||||
}
|
||||
|
||||
if(strcasecompare("pwd", cmd)) {
|
||||
if(curl_strequal("pwd", cmd)) {
|
||||
/* output debug output if that is requested */
|
||||
char *tmp = aprintf("257 \"%s\" is current directory.\n", sshp->path);
|
||||
if(!tmp) {
|
||||
|
|
|
|||
|
|
@ -61,7 +61,6 @@
|
|||
#include "../speedcheck.h"
|
||||
#include "../getinfo.h"
|
||||
#include "../strdup.h"
|
||||
#include "../strcase.h"
|
||||
#include "../vtls/vtls.h"
|
||||
#include "../cfilters.h"
|
||||
#include "../connect.h"
|
||||
|
|
@ -695,7 +694,7 @@ static CURLcode ssh_check_fingerprint(struct Curl_easy *data,
|
|||
|
||||
/* This does NOT verify the length of 'pubkey_md5' separately, which will
|
||||
make the comparison below fail unless it is exactly 32 characters */
|
||||
if(!fingerprint || !strcasecompare(md5buffer, pubkey_md5)) {
|
||||
if(!fingerprint || !curl_strequal(md5buffer, pubkey_md5)) {
|
||||
if(fingerprint) {
|
||||
failf(data,
|
||||
"Denied establishing ssh session: mismatch md5 fingerprint. "
|
||||
|
|
@ -919,7 +918,7 @@ static CURLcode sftp_quote(struct Curl_easy *data,
|
|||
sshc->acceptfail = TRUE;
|
||||
}
|
||||
|
||||
if(strcasecompare("pwd", cmd)) {
|
||||
if(curl_strequal("pwd", cmd)) {
|
||||
/* output debug output if that is requested */
|
||||
char *tmp = aprintf("257 \"%s\" is current directory.\n", sshp->path);
|
||||
if(!tmp)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue