cryptoservices/filebasedcertificateandkeystores/test/ttesttools/scripts/sec-filetokens-tools.script
changeset 29 ece3df019add
parent 8 35751d3474b7
child 33 cf642210ecb7
equal deleted inserted replaced
19:cd501b96611d 29:ece3df019add
    11 //
    11 //
    12 // Contributors:
    12 // Contributors:
    13 //
    13 //
    14 // Description: 
    14 // Description: 
    15 //
    15 //
    16 //
    16 
    17 // Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
    18 // All rights reserved.
       
    19 // This component and the accompanying materials are made available
       
    20 // under the terms of the License "Symbian Foundation License v1.0"
       
    21 // which accompanies this distribution, and is available
       
    22 // at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
       
    23 //
       
    24 // Initial Contributors:
       
    25 // Nokia Corporation - initial contribution.
       
    26 //
       
    27 // Contributors:
       
    28 //
       
    29 // Description:
       
    30 //
       
    31 //! @file
    17 //! @file
    32 // filetokens tools unit (integration) tests
    18 // filetokens tools unit (integration) tests
    33 PRINT Run all certtool and keytool tests
    19 PRINT Run all certtool and keytool tests
    34 LOAD_SUITE ttesttools
    20 LOAD_SUITE ttesttools
    35 
    21 
   982 RUN_PROGRAM certtool.exe c:\ttesttools\data\cert_remove3.txt c:\output.txt
   968 RUN_PROGRAM certtool.exe c:\ttesttools\data\cert_remove3.txt c:\output.txt
   983 RUN_PROGRAM keytool.exe c:\ttesttools\data\key_remove1.txt c:\output.txt
   969 RUN_PROGRAM keytool.exe c:\ttesttools\data\key_remove1.txt c:\output.txt
   984 END_TESTCASE SEC-FILETOKENS-EC097-0069
   970 END_TESTCASE SEC-FILETOKENS-EC097-0069
   985 
   971 
   986 
   972 
   987 //! @SYMTestCaseID 	SEC-FILETOKENS-Defect118391-0001
   973 //! @SYMTestCaseID 	SEC-FILETOKENS-Defect118391-0070
   988 //! @SYMTestCaseDesc 	Certool import command
   974 //! @SYMTestCaseDesc 	Certool import command
   989 //! 			(certtool_import_def118391)
   975 //! 			(certtool_import_def118391)
   990 //! @SYMTestPriority 	Medium
   976 //! @SYMTestPriority 	Medium
   991 //! @SYMTestActions  	call Certool import command without a label specified
   977 //! @SYMTestActions  	call Certool import command without a label specified
   992 //! @SYMTestExpectedResults Certtool  should not display any error message and work fine.
   978 //! @SYMTestExpectedResults Certtool  should not display any error message and work fine.
   993 
   979 
   994 START_TESTCASE SEC-FILETOKENS-Defect118391-0001
   980 START_TESTCASE SEC-FILETOKENS-Defect118391-0070
   995 RUN_PROGRAM certtool.exe c:\ttesttools\data\cert_import.txt c:\output.txt
   981 RUN_PROGRAM certtool.exe c:\ttesttools\data\cert_import.txt c:\output.txt
   996 RUN_TEST_STEP 100 ttesttools ListCertStep c:\ttesttools\scripts\sec-filetokens-tools.ini certtool_import
   982 RUN_TEST_STEP 100 ttesttools ListCertStep c:\ttesttools\scripts\sec-filetokens-tools.ini certtool_import
   997 RUN_TEST_STEP 100 ttesttools ListKeyStep c:\ttesttools\scripts\sec-filetokens-tools.ini certtool_import
   983 RUN_TEST_STEP 100 ttesttools ListKeyStep c:\ttesttools\scripts\sec-filetokens-tools.ini certtool_import
   998 END_TESTCASE SEC-FILETOKENS-Defect118391-0001
   984 END_TESTCASE SEC-FILETOKENS-Defect118391-0070
   999 
   985 
  1000 
   986 
  1001 //! @SYMTestCaseID 	SEC-FILETOKENS-Defect118391-0002
   987 //! @SYMTestCaseID 	SEC-FILETOKENS-Defect118391-0071
  1002 //! @SYMTestCaseDesc 	Certool setapps command
   988 //! @SYMTestCaseDesc 	Certool setapps command
  1003 //! 			(certtool_setapps_defect118391)
   989 //! 			(certtool_setapps_defect118391)
  1004 //! @SYMTestPriority 	Medium
   990 //! @SYMTestPriority 	Medium
  1005 //! @SYMTestActions  	call Certool setapps command with a label option specified
   991 //! @SYMTestActions  	call Certool setapps command with a label option specified
  1006 //! @SYMTestExpectedResults Certtool  should not display any error message and work fine.
   992 //! @SYMTestExpectedResults Certtool  should not display any error message and work fine.
  1007 
   993 
  1008 
   994 
  1009 START_TESTCASE SEC-FILETOKENS-Defect118391-0002
   995 START_TESTCASE SEC-FILETOKENS-Defect118391-0071
  1010 RUN_PROGRAM certtool.exe c:\ttesttools\data\cert_setapps1.txt c:\output.txt
   996 RUN_PROGRAM certtool.exe c:\ttesttools\data\cert_setapps1.txt c:\output.txt
  1011 RUN_TEST_STEP 100 ttesttools GetTrustAppsStep c:\ttesttools\scripts\sec-filetokens-tools.ini certtool_setapps1
   997 RUN_TEST_STEP 100 ttesttools GetTrustAppsStep c:\ttesttools\scripts\sec-filetokens-tools.ini certtool_setapps1
  1012 END_TESTCASE SEC-FILETOKENS-Defect118391-0002
   998 END_TESTCASE SEC-FILETOKENS-Defect118391-0071
  1013 
   999 
  1014 
  1000 
  1015 //! @SYMTestCaseID 	SEC-FILETOKENS-Defect118391-0003
  1001 //! @SYMTestCaseID 	SEC-FILETOKENS-Defect118391-0072
  1016 //! @SYMTestCaseDesc 	Certool setapps command  
  1002 //! @SYMTestCaseDesc 	Certool setapps command  
  1017 //! 			(certtool_trust)
  1003 //! 			(certtool_trust)
  1018 //! @SYMTestPriority 	Medium
  1004 //! @SYMTestPriority 	Medium
  1019 //! @SYMTestActions  	call Certool to set the application trust status for the certificate
  1005 //! @SYMTestActions  	call Certool to set the application trust status for the certificate
  1020 //! @SYMTestExpectedResults Query certstore via CUnifiedCertstore for the certificats trust status
  1006 //! @SYMTestExpectedResults Query certstore via CUnifiedCertstore for the certificats trust status
  1021 
  1007 
  1022 START_TESTCASE SEC-FILETOKENS-Defect118391-0003
  1008 START_TESTCASE SEC-FILETOKENS-Defect118391-0072
  1023 RUN_PROGRAM certtool.exe c:\ttesttools\data\cert_setapps.txt c:\output.txt
  1009 RUN_PROGRAM certtool.exe c:\ttesttools\data\cert_setapps.txt c:\output.txt
  1024 RUN_TEST_STEP 100 ttesttools GetTrustStep c:\ttesttools\scripts\sec-filetokens-tools.ini certtool_setapps2
  1010 RUN_TEST_STEP 100 ttesttools GetTrustStep c:\ttesttools\scripts\sec-filetokens-tools.ini certtool_setapps2
  1025 END_TESTCASE SEC-FILETOKENS-Defect118391-0003
  1011 END_TESTCASE SEC-FILETOKENS-Defect118391-0072
       
  1012 
       
  1013 
       
  1014 //! @SYMTestCaseID 	SEC-FILETOKENS-QI-0073
       
  1015 //! @SYMTestCaseDesc 	Certool addapps command
       
  1016 //! 			(certtool_addapps_QI)
       
  1017 //! @SYMTestPriority 	Medium
       
  1018 //! @SYMTestActions  	First remove the cert, then import the certificate then call Certool to set the application trust status for the certificate
       
  1019 //! @SYMTestExpectedResults Query certstore via CUnifiedCertstore for the certificats app status.
       
  1020 
       
  1021 
       
  1022 START_TESTCASE SEC-FILETOKENS-QI-0073
       
  1023 RUN_PROGRAM certtool.exe c:\ttesttools\data\cert_addapps1.txt c:\output.txt
       
  1024 RUN_TEST_STEP 100 ttesttools GetTrustAppsStep c:\ttesttools\scripts\sec-filetokens-tools.ini certtool_addapps1
       
  1025 END_TESTCASE SEC-FILETOKENS-QI-0073
       
  1026 
       
  1027 
       
  1028 //! @SYMTestCaseID 	SEC-FILETOKENS-QI-0074
       
  1029 //! @SYMTestCaseDesc 	Certool addapps command  
       
  1030 //! 			(certtool_trust)
       
  1031 //! @SYMTestPriority 	Medium
       
  1032 //! @SYMTestActions  	call gettrust status to check the trust status for the certificate
       
  1033 //! @SYMTestExpectedResults Query certstore via CUnifiedCertstore for the certificats trust status
       
  1034 
       
  1035 START_TESTCASE SEC-FILETOKENS-QI-0074
       
  1036 RUN_TEST_STEP 100 ttesttools GetTrustStep c:\ttesttools\scripts\sec-filetokens-tools.ini certtool_addapps2
       
  1037 END_TESTCASE SEC-FILETOKENS-QI-0074
       
  1038 
       
  1039 //! @SYMTestCaseID 	SEC-FILETOKENS-IMPROVEMENT-0001
       
  1040 //! @SYMTestCaseDesc 	Certtool import command
       
  1041 //! @SYMTestPriority 	Medium
       
  1042 //! @SYMTestActions  	call Certtool to import a certificate with the deletable flag set to 'y'.
       
  1043 //! @SYMTestExpectedResults Call certstore list via CUnifiedCertstore, the certificate is listed.
       
  1044 
       
  1045 START_TESTCASE SEC-FILETOKENS-IMPROVEMENT-0001
       
  1046 RUN_PROGRAM certtool.exe c:\ttesttools\data\cert_importdeletable1.txt c:\output.txt
       
  1047 RUN_TEST_STEP 100 ttesttools ListCertStep c:\ttesttools\scripts\sec-filetokens-tools.ini certtool_importdeletable1
       
  1048 
       
  1049 END_TESTCASE SEC-FILETOKENS-IMPROVEMENT-0001
       
  1050 
       
  1051 
       
  1052 //! @SYMTestCaseID 	SEC-FILETOKENS-IMPROVEMENT-0002
       
  1053 //! @SYMTestCaseDesc 	Certtool import command
       
  1054 //! @SYMTestPriority 	Medium
       
  1055 //! @SYMTestActions  	call Certtool to import a certificate with the deletable flag set to 'n'.
       
  1056 //! @SYMTestExpectedResults Call certstore list via CUnifiedCertstore, the certificate is listed.
       
  1057 
       
  1058 START_TESTCASE SEC-FILETOKENS-IMPROVEMENT-0002
       
  1059 RUN_PROGRAM certtool.exe c:\ttesttools\data\cert_importdeletable2.txt c:\output.txt
       
  1060 RUN_TEST_STEP 100 ttesttools ListCertStep c:\ttesttools\scripts\sec-filetokens-tools.ini certtool_importdeletable2
       
  1061 END_TESTCASE SEC-FILETOKENS-IMPROVEMENT-0002
       
  1062 
       
  1063 //! @SYMTestCaseID 	SEC-FILETOKENS-IMPROVEMENT-0003
       
  1064 //! @SYMTestCaseDesc 	Certtool import command
       
  1065 //! @SYMTestPriority 	Medium
       
  1066 //! @SYMTestActions  	call Certtool to import a certificate with the deletable flag set to a garbage value.
       
  1067 //! @SYMTestExpectedResults The expected output is "An error occured during certificate import."
       
  1068 
       
  1069 START_TESTCASE SEC-FILETOKENS-IMPROVEMENT-0003
       
  1070 RUN_PROGRAM certtool.exe c:\ttesttools\data\cert_importdeletable3.txt c:\output.txt
       
  1071 RUN_TEST_STEP 100 ttesttools ParseFileStep c:\ttesttools\scripts\sec-filetokens-tools.ini certtool_importdeletable3
       
  1072 END_TESTCASE SEC-FILETOKENS-IMPROVEMENT-0003
       
  1073 
       
  1074 
       
  1075 //! @SYMTestCaseID 	SEC-FILETOKENS-IMPROVEMENT-0004
       
  1076 //! @SYMTestCaseDesc 	Certtool remove command
       
  1077 //! @SYMTestPriority 	Medium
       
  1078 //! @SYMTestActions  	Call certtool to remove the certificate imported with deletable set to 'y'
       
  1079 //! @SYMTestExpectedResults The expected output is "Certificate removed successfully."
       
  1080 
       
  1081 START_TESTCASE SEC-FILETOKENS-IMPROVEMENT-0004
       
  1082 RUN_PROGRAM certtool.exe c:\ttesttools\data\cert_removedeletable1.txt c:\output.txt
       
  1083 RUN_TEST_STEP 100 ttesttools ParseFileStep c:\ttesttools\scripts\sec-filetokens-tools.ini certtool_removedeletable1
       
  1084 END_TESTCASE SEC-FILETOKENS-IMPROVEMENT-0004
       
  1085 
       
  1086 
       
  1087 //! @SYMTestCaseID 	SEC-FILETOKENS-IMPROVEMENT-0005
       
  1088 //! @SYMTestCaseDesc 	Certtool remove command
       
  1089 //! @SYMTestPriority 	Medium
       
  1090 //! @SYMTestActions  	Call certtool to remove the certificate imported with deletable set to 'n'
       
  1091 //! @SYMTestExpectedResults "The expected output is Certificate removal failed."
       
  1092 
       
  1093 START_TESTCASE SEC-FILETOKENS-IMPROVEMENT-0005
       
  1094 RUN_PROGRAM certtool.exe c:\ttesttools\data\cert_removedeletable2.txt c:\output.txt
       
  1095 RUN_TEST_STEP 100 ttesttools ParseFileStep c:\ttesttools\scripts\sec-filetokens-tools.ini certtool_removedeletable2
       
  1096 END_TESTCASE SEC-FILETOKENS-IMPROVEMENT-0005
       
  1097 
       
  1098