fix: Resolve compiler warnings and fix potential bugs (#5130)

This commit is contained in:
Matej Kenda
2025-12-22 15:27:11 +01:00
committed by GitHub
parent 5ad3c41e20
commit 1461ec618b
103 changed files with 3616 additions and 2740 deletions

View File

@@ -264,8 +264,8 @@ int SSLManager::privateKeyPassphraseCallback(char* pBuf, int size, int flag, voi
strncpy(pBuf, (char *)(pwd.c_str()), size);
pBuf[size - 1] = '\0';
if (size > pwd.length())
size = (int) pwd.length();
if (static_cast<std::size_t>(size) > pwd.length())
size = static_cast<int>(pwd.length());
return size;
}
@@ -316,7 +316,7 @@ int SSLManager::verifyOCSPResponseCallback(SSL* pSSL, void* arg)
X509* pPeerIssuerCert = nullptr;
STACK_OF(X509)* pCertChain = SSL_get_peer_cert_chain(pSSL);
unsigned certChainLen = sk_X509_num(pCertChain);
for (int i= 0; i < certChainLen ; i++)
for (unsigned i = 0; i < certChainLen; i++)
{
if (!pPeerIssuerCert)
{