2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>

Changed the type of padName from `const std::string&' to `const 
char*'.
	* src/MSEHandshake.cc (verifyPadLength)
pull/1/head
Tatsuhiro Tsujikawa 2008-05-14 13:14:04 +00:00
parent 0eb5ca187f
commit 309ad8c5ef
3 changed files with 10 additions and 5 deletions

View File

@ -1,3 +1,8 @@
2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Changed the type of padName from `const std::string&' to `const char*'.
* src/MSEHandshake.cc (verifyPadLength)
2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Defined "sha1" as static const std::string.

View File

@ -519,15 +519,15 @@ void MSEHandshake::sendReceiverStep2()
encryptAndSendData(buffer, 8+4+2+padDLength);
}
uint16_t MSEHandshake::verifyPadLength(const unsigned char* padlenbuf, const std::string& padName)
uint16_t MSEHandshake::verifyPadLength(const unsigned char* padlenbuf, const char* padName)
{
_logger->debug("CUID#%d - Veryfying Pad length for %s", _cuid, padName.c_str());
_logger->debug("CUID#%d - Veryfying Pad length for %s", _cuid, padName);
uint16_t padLength = decodeLength16(padlenbuf);
_logger->debug("CUID#%d - len(%s)=%u", _cuid, padName.c_str(), padLength);
_logger->debug("CUID#%d - len(%s)=%u", _cuid, padName, padLength);
if(padLength > 512) {
throw DlAbortEx
(StringFormat("Too large %s length: %u", padName.c_str(), padLength).str());
(StringFormat("Too large %s length: %u", padName, padLength).str());
}
return padLength;
}

View File

@ -116,7 +116,7 @@ private:
}
uint16_t verifyPadLength(const unsigned char* padlenbuf,
const std::string& padName);
const char* padName);
void verifyVC(const unsigned char* vcbuf);