Cleanup Windows build after refactoring

This commit is contained in:
Jeffrey Walton 2023-04-15 21:50:33 -04:00
parent ddb8f36e88
commit 702b0fd5a7
No known key found for this signature in database
GPG Key ID: B36AB348921B1838
4 changed files with 5 additions and 7 deletions

View File

@ -66,8 +66,6 @@ NAMESPACE_END
USING_NAMESPACE(CryptoPP)
using set_new_handler;
static PNew s_pNew = NULLPTR;
static PDelete s_pDelete = NULLPTR;
@ -111,7 +109,7 @@ static void SetNewAndDeleteFunctionPointers()
{
s_pNew = &New;
s_pDelete = &free;
pSetNewAndDelete(s_pNew, s_pDelete, &set_new_handler);
pSetNewAndDelete(s_pNew, s_pDelete, &std::set_new_handler);
return;
}
}

View File

@ -95,7 +95,7 @@ namespace std {
// C++Builder's standard library (Dinkumware) do not have C's global log() function
// https://github.com/weidai11/cryptopp/issues/520
#ifdef __BORLANDC__
using log;
using std::log;
#endif
#endif // CRYPTOPP_STDCPP_H

View File

@ -1556,7 +1556,7 @@ bool TestASN1Functions()
len = DEREncodeOctetString(encoded, ConstBytePtr(message), BytePtrSize(message));
DERReencode(encoded, reencoded);
rlen = reencoded.MaxRetrievable();
rlen = (size_t)reencoded.MaxRetrievable();
(void)BERDecodeOctetString(reencoded, decoded);
std::string recovered;
@ -1589,7 +1589,7 @@ bool TestASN1Functions()
len = DEREncodeTextString(encoded, ConstBytePtr(message), BytePtrSize(message), asnStringTypes[i]);
DERReencode(encoded, reencoded);
rlen = reencoded.MaxRetrievable();
rlen = (size_t)reencoded.MaxRetrievable();
(void)BERDecodeTextString(reencoded, recovered, asnStringTypes[i]);
fail = (len != rlen || message != recovered);

View File

@ -158,7 +158,7 @@ bool ValidateRSA_Encrypt()
rsaPriv.DEREncodePrivateKey(q);
RSA::PrivateKey rsaPriv2;
rsaPriv2.BERDecodePrivateKey(q, true, q.MaxRetrievable());
rsaPriv2.BERDecodePrivateKey(q, true, (size_t)q.MaxRetrievable());
fail = (rsaPriv != rsaPriv2);
pass = pass && !fail;