mirror of
https://github.com/pocoproject/poco.git
synced 2026-01-12 00:04:54 +08:00
fix: Resolve compiler warnings and fix potential bugs (#5130)
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user