projects/aports·blob master · refs

42 lines · 2.0 KiB

1"uint" is not a type
2
3diff --git a/zrtp/ZRtp.cpp b/zrtp/ZRtp.cpp
4index 8799f4c..74e2485 100755
5--- a/zrtp/ZRtp.cpp
6+++ b/zrtp/ZRtp.cpp
7@@ -947,7 +947,7 @@ ZrtpPacketConfirm* ZRtp::prepareConfirm2(ZrtpPacketConfirm* confirm1, uint32_t*
8
9 // Use the Responder's keys here because we are Initiator here and
10 // receive packets from Responder
11- uint32_t hmlen = (confirm1->getLength() - (uint)9) * ZRTP_WORD_SIZE;
12+ uint32_t hmlen = (confirm1->getLength() - 9U) * ZRTP_WORD_SIZE;
13
14 // Use negotiated HMAC (hash)
15 hmacFunction(hmacKeyR, hashLength, confirm1->getHashH0(), hmlen, confMac, &macLen);
16@@ -1033,7 +1033,7 @@ ZrtpPacketConfirm* ZRtp::prepareConfirm2(ZrtpPacketConfirm* confirm1, uint32_t*
17 getZidCacheInstance()->saveRecord(zidRec);
18
19 // Encrypt and HMAC with Initiator's key - we are Initiator here
20- hmlen = (zrtpConfirm2.getLength() - (uint)9) * ZRTP_WORD_SIZE;
21+ hmlen = (zrtpConfirm2.getLength() - 9U) * ZRTP_WORD_SIZE;
22 cipher->getEncrypt()(zrtpKeyI, cipher->getKeylen(), randomIV, zrtpConfirm2.getHashH0(), hmlen);
23
24 // Use negotiated HMAC (hash)
25@@ -1154,7 +1154,7 @@ ZrtpPacketConf2Ack* ZRtp::prepareConf2Ack(ZrtpPacketConfirm *confirm2, uint32_t*
26
27 // Use the Initiator's keys here because we are Responder here and
28 // reveice packets from Initiator
29- uint32_t hmlen = (confirm2->getLength() - (uint)9) * ZRTP_WORD_SIZE;
30+ uint32_t hmlen = (confirm2->getLength() - 9U) * ZRTP_WORD_SIZE;
31
32 // Use negotiated HMAC (hash)
33 hmacFunction(hmacKeyI, hashLength, confirm2->getHashH0(), hmlen, confMac, &macLen);
34@@ -2844,7 +2844,7 @@ bool ZRtp::sendSASRelayPacket(uint8_t* sh, std::string render) {
35 zrtpSasRelay.setTrustedSas(sh);
36 zrtpSasRelay.setSasAlgo((uint8_t*)render.c_str());
37
38- uint32_t hmlen = (zrtpSasRelay.getLength() - (uint)9) * ZRTP_WORD_SIZE;
39+ uint32_t hmlen = (zrtpSasRelay.getLength() - 9U) * ZRTP_WORD_SIZE;
40 cipher->getEncrypt()(ekey, cipher->getKeylen(), randomIV, (uint8_t*)zrtpSasRelay.getFiller(), hmlen);
41
42 // Use negotiated HMAC (hash)