332 |
332 |
333 void UT_CSRTPStreamOut::Teardown( ) |
333 void UT_CSRTPStreamOut::Teardown( ) |
334 { |
334 { |
335 delete iDecryptedPayload; |
335 delete iDecryptedPayload; |
336 delete iTestPayload160Bits; |
336 delete iTestPayload160Bits; |
337 |
|
338 iDecryptedPayload = NULL; |
|
339 iTestPayload160Bits = NULL; |
|
340 //delete iTestMKI128Bits; |
337 //delete iTestMKI128Bits; |
341 |
338 |
342 delete iStreamOut; |
339 delete iStreamOut; |
343 delete iSRTPSession; |
340 delete iSRTPSession; |
344 |
|
345 iStreamOut = NULL; |
|
346 iSRTPSession = NULL; |
|
347 |
341 |
348 |
342 |
349 delete iRFC3711_SessionEncrKey128bits; |
343 delete iRFC3711_SessionEncrKey128bits; |
350 delete iRFC3711_SessionSaltKey128bits; |
344 delete iRFC3711_SessionSaltKey128bits; |
351 delete iRFC3711_SessionAuthKey128bits; |
345 delete iRFC3711_SessionAuthKey128bits; |
352 delete iRFC3711_RtcpEncrKey128bits; |
346 delete iRFC3711_RtcpEncrKey128bits; |
353 delete iRFC3711_RtcpSaltKey128bits; |
347 delete iRFC3711_RtcpSaltKey128bits; |
354 delete iRFC3711_RtcpAuthKey128bits; |
348 delete iRFC3711_RtcpAuthKey128bits; |
355 |
349 |
356 iRFC3711_SessionEncrKey128bits = NULL; |
350 } |
357 iRFC3711_SessionSaltKey128bits = NULL; |
351 |
358 iRFC3711_SessionAuthKey128bits = NULL; |
352 void UT_CSRTPStreamOut::UT_CSRTPStreamOut_NewL_1L( ) |
359 iRFC3711_RtcpEncrKey128bits = NULL; |
|
360 iRFC3711_RtcpSaltKey128bits = NULL; |
|
361 iRFC3711_RtcpAuthKey128bits = NULL; |
|
362 } |
|
363 |
|
364 void UT_CSRTPStreamOut::UT_CSRTPStreamOut_NewL_OneL( ) |
|
365 { |
353 { |
366 CSRTPStreamOut* tempStreamOut = CSRTPStreamOut::NewL(*iSRTPSession, (TUint)1); |
354 CSRTPStreamOut* tempStreamOut = CSRTPStreamOut::NewL(*iSRTPSession, (TUint)1); |
367 EUNIT_ASSERT(tempStreamOut->SSRC()== 1); |
355 EUNIT_ASSERT(tempStreamOut->SSRC()== 1); |
368 delete tempStreamOut; |
356 delete tempStreamOut; |
369 } |
357 } |
370 |
358 |
371 void UT_CSRTPStreamOut::UT_CSRTPStreamOut_NewL_TwoL( ) |
359 void UT_CSRTPStreamOut::UT_CSRTPStreamOut_NewL_2L( ) |
372 { |
360 { |
373 HBufC8* masterKey = HBufC8::NewL(KRFC3711_TestMasterKey128bits().Length()); |
361 HBufC8* masterKey = HBufC8::NewL(KRFC3711_TestMasterKey128bits().Length()); |
374 CleanupStack::PushL( masterKey ); |
362 CleanupStack::PushL( masterKey ); |
375 *masterKey = KRFC3711_TestMasterKey128bits; |
363 *masterKey = KRFC3711_TestMasterKey128bits; |
376 |
364 |
409 EUNIT_ASSERT(tempStreamOut->GetCryptoContext().Valid()==ETrue); |
397 EUNIT_ASSERT(tempStreamOut->GetCryptoContext().Valid()==ETrue); |
410 delete tempStreamOut; |
398 delete tempStreamOut; |
411 delete srtpSession; |
399 delete srtpSession; |
412 } |
400 } |
413 |
401 |
414 void UT_CSRTPStreamOut::UT_CSRTPStreamOut_NewL_ThreeL( ) |
402 void UT_CSRTPStreamOut::UT_CSRTPStreamOut_NewL_3L( ) |
415 { |
403 { |
416 HBufC8* masterKey = HBufC8::NewL(KRFC3711_TestMasterKey128bits().Length()); |
404 HBufC8* masterKey = HBufC8::NewL(KRFC3711_TestMasterKey128bits().Length()); |
417 CleanupStack::PushL( masterKey ); |
405 CleanupStack::PushL( masterKey ); |
418 *masterKey = KRFC3711_TestMasterKey128bits; |
406 *masterKey = KRFC3711_TestMasterKey128bits; |
419 |
407 |
774 EUNIT_TEST( |
762 EUNIT_TEST( |
775 "NewL1 - test ", |
763 "NewL1 - test ", |
776 "CSRTPStreamOut", |
764 "CSRTPStreamOut", |
777 "NewL", |
765 "NewL", |
778 "FUNCTIONALITY", |
766 "FUNCTIONALITY", |
779 SetupL, UT_CSRTPStreamOut_NewL_OneL, Teardown) |
767 SetupL, UT_CSRTPStreamOut_NewL_1L, Teardown) |
780 |
768 |
781 EUNIT_TEST( |
769 EUNIT_TEST( |
782 "NewL2 - test ", |
770 "NewL2 - test ", |
783 "CSRTPStreamOut", |
771 "CSRTPStreamOut", |
784 "NewL2", |
772 "NewL2", |
785 "FUNCTIONALITY", |
773 "FUNCTIONALITY", |
786 SetupL, UT_CSRTPStreamOut_NewL_TwoL, Teardown) |
774 SetupL, UT_CSRTPStreamOut_NewL_2L, Teardown) |
787 EUNIT_TEST( |
775 EUNIT_TEST( |
788 "NewL3 - test ", |
776 "NewL3 - test ", |
789 "CSRTPStreamOut", |
777 "CSRTPStreamOut", |
790 "NewL3", |
778 "NewL3", |
791 "FUNCTIONALITY", |
779 "FUNCTIONALITY", |
792 SetupL, UT_CSRTPStreamOut_NewL_ThreeL, Teardown) |
780 SetupL, UT_CSRTPStreamOut_NewL_3L, Teardown) |
793 |
781 |
794 EUNIT_TEST( |
782 EUNIT_TEST( |
795 "ProtectRtpL - test ", |
783 "ProtectRtpL - test ", |
796 "CSRTPStreamOut", |
784 "CSRTPStreamOut", |
797 "ProtectRtpL", |
785 "ProtectRtpL", |