mirror of
https://git.jami.net/savoirfairelinux/jami-daemon.git
synced 2025-08-12 22:09:25 +08:00
[#1722] Fix mkiLifetime mkiKeyLength separator
This commit is contained in:
@ -73,7 +73,7 @@ std::string AudioSrtpSession::getLocalCryptoInfo() {
|
||||
std::string srtp_keys = "inline:";
|
||||
// srtp_keys.append("16/14/");
|
||||
srtp_keys += getBase64ConcatenatedKeys();
|
||||
srtp_keys.append("/2^20/1:32");
|
||||
srtp_keys.append("|2^20|1:32");
|
||||
|
||||
std::string crypto = tag.append(" ");
|
||||
crypto += crypto_suite.append(" ");
|
||||
|
@ -74,7 +74,7 @@ void SdesNegotiator::parse (void)
|
||||
|
||||
keyParamsPattern = new Pattern (
|
||||
"(?P<srtpKeyMethod>inline|[A-Za-z0-9_]+)\\:" \
|
||||
"(?P<srtpKeyInfo>[A-Za-z0-9\x2B\x2F\x3D]+)\\|" \
|
||||
"(?P<srtpKeyInfo>[A-Za-z0-9\x2B\x2F\x3D]+|[\w\x2B\x2F\x3D]+)\\|" \
|
||||
"2\\^(?P<lifetime>[0-9]+)\\|" \
|
||||
"(?P<mkiValue>[0-9]+)\\:" \
|
||||
"(?P<mkiLength>[0-9]{1,3})\\;?", "g");
|
||||
|
@ -41,9 +41,9 @@ using std::endl;
|
||||
void SdesNegotiatorTest::setUp()
|
||||
{
|
||||
|
||||
// std::string attr("1 AES_CM_128_HMAC_SHA1_32 srtp inline:16/14/AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwd/2^20/1:32");
|
||||
std::string attr("a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwd|2^20|1:32");
|
||||
|
||||
std::string attr("a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:d0RmdmcmVCspeEc3QGZiNWpVLFJhQX1cfHAwJSoj|2^20|1:32");
|
||||
// std::string attr("a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:d0RmdmcmVCspeEc3QGZiNWpVLFJhQX1cfHAwJSoj|2^20|1:32");
|
||||
|
||||
remoteOffer = new std::vector<std::string>();
|
||||
remoteOffer->push_back(attr);
|
||||
@ -149,7 +149,7 @@ void SdesNegotiatorTest::testNegotiation()
|
||||
CPPUNIT_ASSERT(sdesnego->negotiate());
|
||||
CPPUNIT_ASSERT(sdesnego->getCryptoSuite().compare("AES_CM_128_HMAC_SHA1_80") == 0);
|
||||
CPPUNIT_ASSERT(sdesnego->getKeyMethod().compare("inline") == 0);
|
||||
CPPUNIT_ASSERT(sdesnego->getKeyInfo().compare("d0RmdmcmVCspeEc3QGZiNWpVLFJhQX1cfHAwJSoj") == 0);
|
||||
CPPUNIT_ASSERT(sdesnego->getKeyInfo().compare("AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwd") == 0);
|
||||
CPPUNIT_ASSERT(sdesnego->getLifeTime().compare("20") == 0);
|
||||
CPPUNIT_ASSERT(sdesnego->getMkiValue().compare("1") == 0);
|
||||
CPPUNIT_ASSERT(sdesnego->getMkiLength().compare("32") == 0);
|
||||
|
Reference in New Issue
Block a user