mirror of
https://github.com/shadps4-emu/ext-cryptopp.git
synced 2024-11-23 09:59:42 +00:00
Clear MSVC conversion warning
This commit is contained in:
parent
4473b50803
commit
9dcfe507d3
10
validat0.cpp
10
validat0.cpp
@ -1543,6 +1543,10 @@ bool TestASN1Parse()
|
||||
return pass;
|
||||
}
|
||||
|
||||
inline byte int2byte(int n) {
|
||||
return static_cast<byte>(n);
|
||||
}
|
||||
|
||||
bool TestASN1Functions()
|
||||
{
|
||||
std::cout << "\nTesting ASN.1 functions...\n\n";
|
||||
@ -1584,7 +1588,7 @@ bool TestASN1Functions()
|
||||
ByteQueue encoded, reencoded, decoded;
|
||||
std::string recovered;
|
||||
|
||||
len = DEREncodeTextString(encoded, ConstBytePtr(message), BytePtrSize(message), asnStringTypes[i]);
|
||||
len = DEREncodeTextString(encoded, ConstBytePtr(message), BytePtrSize(message), int2byte(asnStringTypes[i]));
|
||||
DERReencode(encoded, reencoded);
|
||||
rlen = reencoded.MaxRetrievable();
|
||||
(void)BERDecodeTextString(reencoded, recovered, asnStringTypes[i]);
|
||||
@ -1615,8 +1619,8 @@ bool TestASN1Functions()
|
||||
ByteQueue encoded, decoded;
|
||||
SecByteBlock recovered;
|
||||
|
||||
(void)DEREncodeDate(encoded, message, asnDateTypes[i]);
|
||||
(void)BERDecodeDate(encoded, recovered, asnDateTypes[i]);
|
||||
(void)DEREncodeDate(encoded, message, int2byte(asnDateTypes[i]));
|
||||
(void)BERDecodeDate(encoded, recovered, int2byte(asnDateTypes[i]));
|
||||
|
||||
fail = (message != recovered);
|
||||
if (fail) failed++;
|
||||
|
Loading…
Reference in New Issue
Block a user