fixed warnings

This commit is contained in:
Günter Obiltschnig 2019-08-14 20:26:34 +02:00
parent 2637aa6610
commit 3c3bc44d3f
2 changed files with 4 additions and 4 deletions

View File

@ -113,7 +113,7 @@ ECDSASignature::ECDSASignature(const ByteVec& derSignature)
poco_assert (!derSignature.empty()); poco_assert (!derSignature.empty());
const unsigned char* p = &derSignature[0]; const unsigned char* p = &derSignature[0];
_pSig = d2i_ECDSA_SIG(0, &p, derSignature.size()); _pSig = d2i_ECDSA_SIG(0, &p, static_cast<long>(derSignature.size()));
if (!_pSig) if (!_pSig)
throw OpenSSLException(); throw OpenSSLException();
} }
@ -130,8 +130,8 @@ ECDSASignature::ECDSASignature(const ByteVec& rawR, const ByteVec& rawS):
{ {
#if OPENSSL_VERSION_NUMBER >= 0x10100000L #if OPENSSL_VERSION_NUMBER >= 0x10100000L
ECDSA_SIG_set0(_pSig, ECDSA_SIG_set0(_pSig,
BN_bin2bn(&rawR[0], rawR.size(), 0), BN_bin2bn(&rawR[0], static_cast<long>(rawR.size()), 0),
BN_bin2bn(&rawS[0], rawS.size(), 0)); BN_bin2bn(&rawS[0], static_cast<long>(rawS.size()), 0));
const BIGNUM* pR = 0; const BIGNUM* pR = 0;
const BIGNUM* pS = 0; const BIGNUM* pS = 0;
ECDSA_SIG_get0(_pSig, &pR, &pS); ECDSA_SIG_get0(_pSig, &pR, &pS);

View File

@ -166,7 +166,7 @@ void Token::setTimestamp(const std::string& claim, const Poco::Timestamp& ts)
Poco::Timestamp Token::getTimestamp(const std::string& claim) const Poco::Timestamp Token::getTimestamp(const std::string& claim) const
{ {
double epochSeconds = _pPayload->optValue(claim, 0.0); double epochSeconds = _pPayload->optValue(claim, 0.0);
Poco::Timestamp::TimeVal tv = epochSeconds*Poco::Timestamp::resolution(); Poco::Timestamp::TimeVal tv = static_cast<Poco::Timestamp::TimeVal>(epochSeconds*Poco::Timestamp::resolution());
return Poco::Timestamp(tv); return Poco::Timestamp(tv);
} }