diff --git a/sflphone-common/src/audio/audiortp/AudioSrtpSession.cpp b/sflphone-common/src/audio/audiortp/AudioSrtpSession.cpp index e60546ee23c2eeb7cef107dd005055f6734d5d6a..b4a7213aac972e83438c896d58c84b48bb5e0244 100644 --- a/sflphone-common/src/audio/audiortp/AudioSrtpSession.cpp +++ b/sflphone-common/src/audio/audiortp/AudioSrtpSession.cpp @@ -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(" "); diff --git a/sflphone-common/src/sip/SdesNegotiator.cpp b/sflphone-common/src/sip/SdesNegotiator.cpp index e8618e3ab8d80f0bfb9b13fc5205cda5c847c869..6720df78d94c7632abf42e38d63b7e227b9e503e 100644 --- a/sflphone-common/src/sip/SdesNegotiator.cpp +++ b/sflphone-common/src/sip/SdesNegotiator.cpp @@ -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"); diff --git a/sflphone-common/test/sdesnegotiatorTest.cpp b/sflphone-common/test/sdesnegotiatorTest.cpp index ec208664524f6ef32d8e42a8506762dfcf8fe14b..71b429a5eac0a74d4a011b4fd9bbdc8b84067808 100644 --- a/sflphone-common/test/sdesnegotiatorTest.cpp +++ b/sflphone-common/test/sdesnegotiatorTest.cpp @@ -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);