mirror of
https://github.com/curl/curl.git
synced 2026-08-25 10:03:37 +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
|
|
@ -60,7 +60,6 @@
|
|||
#include "vtls_scache.h"
|
||||
#include "../vauth/vauth.h"
|
||||
#include "keylog.h"
|
||||
#include "../strcase.h"
|
||||
#include "hostcheck.h"
|
||||
#include "../multiif.h"
|
||||
#include "../curlx/strparse.h"
|
||||
|
|
@ -1058,15 +1057,15 @@ static int ossl_do_file_type(const char *type)
|
|||
{
|
||||
if(!type || !type[0])
|
||||
return SSL_FILETYPE_PEM;
|
||||
if(strcasecompare(type, "PEM"))
|
||||
if(curl_strequal(type, "PEM"))
|
||||
return SSL_FILETYPE_PEM;
|
||||
if(strcasecompare(type, "DER"))
|
||||
if(curl_strequal(type, "DER"))
|
||||
return SSL_FILETYPE_ASN1;
|
||||
if(strcasecompare(type, "PROV"))
|
||||
if(curl_strequal(type, "PROV"))
|
||||
return SSL_FILETYPE_PROVIDER;
|
||||
if(strcasecompare(type, "ENG"))
|
||||
if(curl_strequal(type, "ENG"))
|
||||
return SSL_FILETYPE_ENGINE;
|
||||
if(strcasecompare(type, "P12"))
|
||||
if(curl_strequal(type, "P12"))
|
||||
return SSL_FILETYPE_PKCS12;
|
||||
return -1;
|
||||
}
|
||||
|
|
@ -1119,7 +1118,7 @@ static int ssl_ui_writer(UI *ui, UI_STRING *uis)
|
|||
*/
|
||||
static bool is_pkcs11_uri(const char *string)
|
||||
{
|
||||
return string && strncasecompare(string, "pkcs11:", 7);
|
||||
return string && curl_strnequal(string, "pkcs11:", 7);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
@ -5520,7 +5519,7 @@ size_t Curl_ossl_version(char *buffer, size_t size)
|
|||
size_t count;
|
||||
const char *ver = OpenSSL_version(OPENSSL_VERSION);
|
||||
const char expected[] = OSSL_PACKAGE " "; /* ie "LibreSSL " */
|
||||
if(strncasecompare(ver, expected, sizeof(expected) - 1)) {
|
||||
if(curl_strnequal(ver, expected, sizeof(expected) - 1)) {
|
||||
ver += sizeof(expected) - 1;
|
||||
}
|
||||
count = msnprintf(buffer, size, "%s/%s", OSSL_PACKAGE, ver);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue