authenticationservices/authenticationserver/test/tAuthSvr/scripts/tauthsvrclock.script
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Thu, 01 Apr 2010 00:24:41 +0300
branchRCL_3
changeset 50 d07aa956024a
parent 32 3490edffc34e
permissions -rw-r--r--
Revision: 201013 Kit: 201013

//
// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of the License "Eclipse Public License v1.0"
// which accompanies this distribution, and is available
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
//
// Initial Contributors:
// Nokia Corporation - initial contribution.
//
// Contributors:
//
// Description: 
//

//Script to test the secure clock implementation in Authserver.


RUN_PROGRAM 100 SETCAP tAuthSvr.exe 188b0 -SID 102740FC tAuthSvr_new.exe

LOAD_SUITE tAuthSvr_new
LOAD_SUITE tAuthSvr

//! @SYMTestCaseID SEC-AUT-AUTHSVR-0144
//! @SYMTestCaseDesc Remove_PinPlugin_Data
START_TESTCASE SEC-AUT-AUTHSVR-0144
RUN_UTILS DeleteFile C:\pinplugin_inactive.txt
RUN_TEST_STEP_RESULT 0 100	tAuthSvr_new 	INIT_CENREP c:\tauth\tAuthSvr\scripts\tauthsvr2.ini defaultplugin
RUN_UTILS DeleteFile  C:\t_pinplugindlg_in.dat
RUN_UTILS DeleteFile  C:\t_pinplugindlg_out.dat
END_TESTCASE SEC-AUT-AUTHSVR-0144



RUN_TEST_STEP_RESULT 0 100	tAuthSvr	UPDATE_SYSTIME c:\tauth\tAuthSvr\scripts\tauthsvr2.ini time

//! @SYMTestCaseID SEC-AUT-AUTHSVR-0193
//! @SYMTestCaseDesc Test the secure clock implementation in AuthServer.A user is first authenticated successfully
//!			  	 after which the system time is set ahead by 600 seconds. Authentication is called again using a
//!			   	a wrong pin and a freshness period of 300. Since a cached identity is returned ,authentication is 
//!			   	successful. 
//! @SYMTestPriority Medium
//! @SYMTestActions Check if a cached identity is being returned
//! @SYMTestExpectedResults Authentication is successful
//! @SYMDevelopedForRelease Intulo 
 
START_TESTCASE SEC-AUT-AUTHSVR-0193
RUN_TEST_STEP_RESULT 0 100	tAuthSvr	REMOVE_DBS
RUN_TEST_STEP_RESULT 0 100	tAuthSvr	REG_IDENTITY   c:\tauth\tAuthSvr\scripts\tauthsvr2.ini Test0197
RUN_TEST_STEP_RESULT 0 100	tAuthSvr	AUTHENTICATE   c:\tauth\tAuthSvr\scripts\tauthsvr2.ini Test0198
RUN_TEST_STEP_RESULT 0 100	tAuthSvr	UPDATE_SYSTIME c:\tauth\tAuthSvr\scripts\tauthsvr2.ini time1
RUN_TEST_STEP_RESULT 0 100	tAuthSvr	AUTHENTICATE   c:\tauth\tAuthSvr\scripts\tauthsvr2.ini Test0199
END_TESTCASE SEC-AUT-AUTHSVR-0193


//! @SYMTestCaseID SEC-AUT-AUTHSVR-0194
//! @SYMTestCaseDesc Test the secure clock implementation in AuthServer.A user is first authenticated successfully
//!			   	after which a 5 second delay is used to advance the secure clock.The system clock is 
//!			   	now set back by 600 seconds and an authentication is called with a wrong pin and freshess 5. Since 
//!			  	 reauthentication occurs ,authentication fails
//! @SYMTestPriority Medium
//! @SYMTestActions Check if a cached identity is not being returned
//! @SYMTestExpectedResults Authentication fails 
//! @SYMDevelopedForRelease Intulo 

START_TESTCASE SEC-AUT-AUTHSVR-0194
RUN_TEST_STEP_RESULT 0 100	tAuthSvr	REMOVE_DBS
RUN_TEST_STEP_RESULT 0 100		tAuthSvr	REG_IDENTITY   c:\tauth\tAuthSvr\scripts\tauthsvr2.ini Test0200
RUN_TEST_STEP_RESULT 0 100		tAuthSvr	AUTHENTICATE   c:\tauth\tAuthSvr\scripts\tauthsvr2.ini Test0201
DELAY 5000
RUN_TEST_STEP_RESULT 0 100		tAuthSvr	UPDATE_SYSTIME c:\tauth\tAuthSvr\scripts\tauthsvr2.ini time2
RUN_TEST_STEP !Result=Fail  100	tAuthSvr	AUTHENTICATE   c:\tauth\tAuthSvr\scripts\tauthsvr2.ini Test0202
END_TESTCASE SEC-AUT-AUTHSVR-0194