rtp/srtpstack/tsrc/ut_srtpstack/src/UT_CSRTPCryptoHandlerSRTCP.cpp
branchRCL_3
changeset 44 0dcb073356a5
parent 43 b5e99d8877c7
equal deleted inserted replaced
43:b5e99d8877c7 44:0dcb073356a5
   226     {
   226     {
   227   	delete iDecryptedPayload;
   227   	delete iDecryptedPayload;
   228     delete iTestPayload160Bits;
   228     delete iTestPayload160Bits;
   229     delete iTestMKI128Bits;
   229     delete iTestMKI128Bits;
   230     delete iTestAuthTag80Bits;
   230     delete iTestAuthTag80Bits;
   231 	
       
   232 	iDecryptedPayload = NULL;
       
   233     iTestPayload160Bits = NULL;
       
   234     iTestMKI128Bits = NULL;
       
   235     iTestAuthTag80Bits = NULL;
       
   236 
   231 
   237     delete iStreamIn;
   232     delete iStreamIn;
   238     delete iSRTPSession;   
   233     delete iSRTPSession;    
   239 
       
   240     iStreamIn = NULL;
       
   241     iSRTPSession = NULL;	
       
   242 
   234 
   243     
   235     
   244     delete iRFC3711_SessionEncrKey128bits;
   236     delete iRFC3711_SessionEncrKey128bits;
   245     delete iRFC3711_SessionSaltKey128bits;
   237     delete iRFC3711_SessionSaltKey128bits;
   246     delete iRFC3711_SessionAuthKey128bits;   
   238     delete iRFC3711_SessionAuthKey128bits;    
   247 
       
   248     iRFC3711_SessionEncrKey128bits = NULL;
       
   249     iRFC3711_SessionSaltKey128bits = NULL;
       
   250     iRFC3711_SessionAuthKey128bits = NULL; 	
       
   251 
   239 
   252     }
   240     }
   253 
   241 
   254 void UT_CSRTPCryptoHandlerSRTCP::UT_CSRTPCryptoHandlerSRTCP_NewLL(  )
   242 void UT_CSRTPCryptoHandlerSRTCP::UT_CSRTPCryptoHandlerSRTCP_NewLL(  )
   255     {
   243     {
   261     EUNIT_ASSERT( ETrue );
   249     EUNIT_ASSERT( ETrue );
   262     }
   250     }
   263 
   251 
   264 
   252 
   265 
   253 
   266 void UT_CSRTPCryptoHandlerSRTCP::UT_DeriveSessionKeysL_OneL()
   254 void UT_CSRTPCryptoHandlerSRTCP::UT_DeriveSessionKeysL_1L()
   267 	{
   255 	{
   268 	HBufC8* encSrtcpPacket =HBufC8::NewLC(KSRTCPPacket().Length());
   256 	HBufC8* encSrtcpPacket =HBufC8::NewLC(KSRTCPPacket().Length());
   269 	*encSrtcpPacket=KSRTCPPacket;
   257 	*encSrtcpPacket=KSRTCPPacket;
   270     Hex(*encSrtcpPacket);
   258     Hex(*encSrtcpPacket);
   271     TInt len= KSRTCPPacket().Length();
   259     TInt len= KSRTCPPacket().Length();
   654 EUNIT_TEST(
   642 EUNIT_TEST(
   655     "DeriveKeys1L - test ",
   643     "DeriveKeys1L - test ",
   656     "CSRTPCryptoHandlerSRTCP",
   644     "CSRTPCryptoHandlerSRTCP",
   657     "DeriveSessionKeys",
   645     "DeriveSessionKeys",
   658     "FUNCTIONALITY",
   646     "FUNCTIONALITY",
   659     SetupL, UT_DeriveSessionKeysL_OneL, Teardown)
   647     SetupL, UT_DeriveSessionKeysL_1L, Teardown)
   660     
   648     
   661 EUNIT_TEST(
   649 EUNIT_TEST(
   662     "Authentication1",
   650     "Authentication1",
   663     "CSRTPCryptoHandlerSRTCP",
   651     "CSRTPCryptoHandlerSRTCP",
   664     "PerformAuthentication",
   652     "PerformAuthentication",