cryptoservices/certificateandkeymgmt/tx509/CorruptionTest.cpp
changeset 108 ca9a0fc2f082
parent 8 35751d3474b7
equal deleted inserted replaced
102:deec7e509f66 108:ca9a0fc2f082
     1 /*
     1 /*
     2 * Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 * Copyright (c) 1998-2010 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     4 * This component and the accompanying materials are made available
     5 * under the terms of the License "Eclipse Public License v1.0"
     5 * under the terms of the License "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
   291 	TPtr8 p(res->Des());
   291 	TPtr8 p(res->Des());
   292 	p.SetLength(size);
   292 	p.SetLength(size);
   293 
   293 
   294 	RFileReadStream stream;
   294 	RFileReadStream stream;
   295 	User::LeaveIfError(stream.Open(iFs, fullname, EFileStream));
   295 	User::LeaveIfError(stream.Open(iFs, fullname, EFileStream));
       
   296 	CleanupClosePushL(stream);
   296 	stream.ReadL(p, size);
   297 	stream.ReadL(p, size);
   297 	stream.Close();
   298 	CleanupStack::PopAndDestroy(&stream);
   298 	return res;
   299 	return res;
   299 	}
   300 	}