//
// 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:
//
// tpkcs7.script
LOAD_SUITE tpkcs7server
START_TESTCASE SEC-CERTMAN-PKCS7-0001
//! @SYMTestCaseID SEC-CERTMAN-PKCS7-0001
RUN_TEST_STEP 100 tpkcs7server Corrupt C:\tpkcs7\tpkcs7_v2.ini INVALID1 # Not corrupt
END_TESTCASE SEC-CERTMAN-PKCS7-0001
START_TESTCASE SEC-CERTMAN-PKCS7-0002
//! @SYMTestCaseID SEC-CERTMAN-PKCS7-0002
RUN_TEST_STEP 100 tpkcs7server Corrupt C:\tpkcs7\tpkcs7_v2.ini CORRUPT1 # Empty
END_TESTCASE SEC-CERTMAN-PKCS7-0002
START_TESTCASE SEC-CERTMAN-PKCS7-0003
//! @SYMTestCaseID SEC-CERTMAN-PKCS7-0003
RUN_TEST_STEP 100 tpkcs7server Corrupt C:\tpkcs7\tpkcs7_v2.ini CORRUPT2 # Corrupt
END_TESTCASE SEC-CERTMAN-PKCS7-0003
START_TESTCASE SEC-CERTMAN-PKCS7-0004
//! @SYMTestCaseID SEC-CERTMAN-PKCS7-0004
RUN_TEST_STEP 100 tpkcs7server Corrupt C:\tpkcs7\tpkcs7_v2.ini CORRUPT3 # Corrupt
END_TESTCASE SEC-CERTMAN-PKCS7-0004
START_TESTCASE SEC-CERTMAN-PKCS7-0005
//! @SYMTestCaseID SEC-CERTMAN-PKCS7-0005
RUN_TEST_STEP 100 tpkcs7server Corrupt C:\tpkcs7\tpkcs7_v2.ini CORRUPT3 # Repeat
END_TESTCASE SEC-CERTMAN-PKCS7-0005
START_TESTCASE SEC-CERTMAN-PKCS7-0006
//! @SYMTestCaseID SEC-CERTMAN-PKCS7-0006
RUN_TEST_STEP 100 tpkcs7server Corrupt C:\tpkcs7\tpkcs7_v2.ini INVALID2 # Not corrupt
END_TESTCASE SEC-CERTMAN-PKCS7-0006
START_TESTCASE SEC-CERTMAN-PKCS7-0007
//! @SYMTestCaseID SEC-CERTMAN-PKCS7-0007
RUN_TEST_STEP 100 tpkcs7server Corrupt C:\tpkcs7\tpkcs7_v2.ini GOODFILE1 # Not corrupt
END_TESTCASE SEC-CERTMAN-PKCS7-0007
START_TESTCASE SEC-CERTMAN-PKCS7-0008
//! @SYMTestCaseID SEC-CERTMAN-PKCS7-0008
RUN_TEST_STEP 100 tpkcs7server Corrupt C:\tpkcs7\tpkcs7_v2.ini GOODFILE1 # Repeat
END_TESTCASE SEC-CERTMAN-PKCS7-0008
START_TESTCASE SEC-CERTMAN-PKCS7-0009
//! @SYMTestCaseID SEC-CERTMAN-PKCS7-0009
RUN_TEST_STEP 100 tpkcs7server Corrupt C:\tpkcs7\tpkcs7_v2.ini CORRUPT4 # Corrupt
END_TESTCASE SEC-CERTMAN-PKCS7-0009
START_TESTCASE SEC-CERTMAN-PKCS7-0010
//! @SYMTestCaseID SEC-CERTMAN-PKCS7-0010
RUN_TEST_STEP 100 tpkcs7server Corrupt C:\tpkcs7\tpkcs7_v2.ini GOODFILE2 # Not corrupt
END_TESTCASE SEC-CERTMAN-PKCS7-0010
START_TESTCASE SEC-CERTMAN-PKCS7-0011
//! @SYMTestCaseID SEC-CERTMAN-PKCS7-0011
RUN_TEST_STEP 100 tpkcs7server Corrupt C:\tpkcs7\tpkcs7_v2.ini GOODFILE3 # Not corrupt
END_TESTCASE SEC-CERTMAN-PKCS7-0011
START_TESTCASE SEC-CERTMAN-PKCS7-0012
//! @SYMTestCaseID SEC-CERTMAN-PKCS7-0012
RUN_TEST_STEP 100 tpkcs7server Valid C:\tpkcs7\tpkcs7_v2.ini INVALID1 # Not valid
END_TESTCASE SEC-CERTMAN-PKCS7-0012
START_TESTCASE SEC-CERTMAN-PKCS7-0013
//! @SYMTestCaseID SEC-CERTMAN-PKCS7-0013
RUN_TEST_STEP 100 tpkcs7server Valid C:\tpkcs7\tpkcs7_v2.ini GOODFILE1 # Valid
END_TESTCASE SEC-CERTMAN-PKCS7-0013
START_TESTCASE SEC-CERTMAN-PKCS7-0014
//! @SYMTestCaseID SEC-CERTMAN-PKCS7-0014
RUN_TEST_STEP 100 tpkcs7server Valid C:\tpkcs7\tpkcs7_v2.ini GOODFILE1 # Repeat
END_TESTCASE SEC-CERTMAN-PKCS7-0014
START_TESTCASE SEC-CERTMAN-PKCS7-0015
//! @SYMTestCaseID SEC-CERTMAN-PKCS7-0015
RUN_TEST_STEP 100 tpkcs7server Valid C:\tpkcs7\tpkcs7_v2.ini INVALID2 # Not valid
END_TESTCASE SEC-CERTMAN-PKCS7-0015
START_TESTCASE SEC-CERTMAN-PKCS7-0016
//! @SYMTestCaseID SEC-CERTMAN-PKCS7-0016
RUN_TEST_STEP 100 tpkcs7server Valid C:\tpkcs7\tpkcs7_v2.ini INVALID2 # Repeat
END_TESTCASE SEC-CERTMAN-PKCS7-0016
START_TESTCASE SEC-CERTMAN-PKCS7-0017
//! @SYMTestCaseID SEC-CERTMAN-PKCS7-0017
RUN_TEST_STEP 100 tpkcs7server Valid C:\tpkcs7\tpkcs7_v2.ini GOODFILE2 # Valid
END_TESTCASE SEC-CERTMAN-PKCS7-0017
START_TESTCASE SEC-CERTMAN-PKCS7-0018
//! @SYMTestCaseID SEC-CERTMAN-PKCS7-0018
RUN_TEST_STEP 100 tpkcs7server Valid C:\tpkcs7\tpkcs7_v2.ini GOODFILE3 # Valid
END_TESTCASE SEC-CERTMAN-PKCS7-0018
START_TESTCASE SEC-CERTMAN-PKCS7-0019
//! @SYMTestCaseID SEC-CERTMAN-PKCS7-0019
RUN_TEST_STEP 100 tpkcs7server Content C:\tpkcs7\tpkcs7_v2.ini INVALID1 # Check content
END_TESTCASE SEC-CERTMAN-PKCS7-0019
START_TESTCASE SEC-CERTMAN-PKCS7-0020
//! @SYMTestCaseID SEC-CERTMAN-PKCS7-0020
RUN_TEST_STEP 100 tpkcs7server Content C:\tpkcs7\tpkcs7_v2.ini GOODFILE1 # Check content
END_TESTCASE SEC-CERTMAN-PKCS7-0020
START_TESTCASE SEC-CERTMAN-PKCS7-0021
//! @SYMTestCaseID SEC-CERTMAN-PKCS7-0021
RUN_TEST_STEP 100 tpkcs7server Content C:\tpkcs7\tpkcs7_v2.ini GOODFILE2 # Check long length
END_TESTCASE SEC-CERTMAN-PKCS7-0021
START_TESTCASE SEC-CERTMAN-PKCS7-0022
//! @SYMTestCaseID SEC-CERTMAN-PKCS7-0022
RUN_TEST_STEP 100 tpkcs7server Content C:\tpkcs7\tpkcs7_v2.ini INVALID2 # Check content
END_TESTCASE SEC-CERTMAN-PKCS7-0022
START_TESTCASE SEC-CERTMAN-PKCS7-0023
//! @SYMTestCaseID SEC-CERTMAN-PKCS7-0023
RUN_TEST_STEP 100 tpkcs7server Content C:\tpkcs7\tpkcs7_v2.ini GOODFILE3 # Check zero length
END_TESTCASE SEC-CERTMAN-PKCS7-0023
START_TESTCASE SEC-CERTMAN-PKCS7-0024
//! @SYMTestCaseID SEC-CERTMAN-PKCS7-0024
RUN_TEST_STEP 100 tpkcs7server Certificate C:\tpkcs7\tpkcs7_v2.ini INVALID1 # Expect fail
END_TESTCASE SEC-CERTMAN-PKCS7-0024
START_TESTCASE SEC-CERTMAN-PKCS7-0025
//! @SYMTestCaseID SEC-CERTMAN-PKCS7-0025
RUN_TEST_STEP 100 tpkcs7server Certificate C:\tpkcs7\tpkcs7_v2.ini INVALID2
END_TESTCASE SEC-CERTMAN-PKCS7-0025
START_TESTCASE SEC-CERTMAN-PKCS7-0026
//! @SYMTestCaseID SEC-CERTMAN-PKCS7-0026
RUN_TEST_STEP 100 tpkcs7server Certificate C:\tpkcs7\tpkcs7_v2.ini GOODFILE1
END_TESTCASE SEC-CERTMAN-PKCS7-0026
START_TESTCASE SEC-CERTMAN-PKCS7-0027
//! @SYMTestCaseID SEC-CERTMAN-PKCS7-0027
RUN_TEST_STEP 100 tpkcs7server Certificate C:\tpkcs7\tpkcs7_v2.ini GOODFILE2
END_TESTCASE SEC-CERTMAN-PKCS7-0027
START_TESTCASE SEC-CERTMAN-PKCS7-0028
//! @SYMTestCaseID SEC-CERTMAN-PKCS7-0028
RUN_TEST_STEP 100 tpkcs7server Certificate C:\tpkcs7\tpkcs7_v2.ini GOODFILE2
END_TESTCASE SEC-CERTMAN-PKCS7-0028
START_TESTCASE SEC-CERTMAN-PKCS7-0029
//! @SYMTestCaseID SEC-CERTMAN-PKCS7-0029
RUN_TEST_STEP 100 tpkcs7server Signer C:\tpkcs7\tpkcs7_v2.ini INVALID1 # Expect fail
END_TESTCASE SEC-CERTMAN-PKCS7-0029
START_TESTCASE SEC-CERTMAN-PKCS7-0030
//! @SYMTestCaseID SEC-CERTMAN-PKCS7-0030
RUN_TEST_STEP 100 tpkcs7server Signer C:\tpkcs7\tpkcs7_v2.ini INVALID2
END_TESTCASE SEC-CERTMAN-PKCS7-0030
START_TESTCASE SEC-CERTMAN-PKCS7-0031
//! @SYMTestCaseID SEC-CERTMAN-PKCS7-0031
RUN_TEST_STEP 100 tpkcs7server Signer C:\tpkcs7\tpkcs7_v2.ini GOODFILE1
END_TESTCASE SEC-CERTMAN-PKCS7-0031
START_TESTCASE SEC-CERTMAN-PKCS7-0032
//! @SYMTestCaseID SEC-CERTMAN-PKCS7-0032
RUN_TEST_STEP 100 tpkcs7server Signer C:\tpkcs7\tpkcs7_v2.ini GOODFILE2
END_TESTCASE SEC-CERTMAN-PKCS7-0032
START_TESTCASE SEC-CERTMAN-PKCS7-0033
//! @SYMTestCaseID SEC-CERTMAN-PKCS7-0033
RUN_TEST_STEP 100 tpkcs7server Signer C:\tpkcs7\tpkcs7_v2.ini GOODFILE2
END_TESTCASE SEC-CERTMAN-PKCS7-0033
START_TESTCASE SEC-CERTMAN-PKCS7-0034
//! @SYMTestCaseID SEC-CERTMAN-PKCS7-0034
RUN_TEST_STEP 100 tpkcs7server EncryptedData C:\tpkcs7\tpkcs7_v2.ini GOOD2_ENCRYPTEDDATA #valid
END_TESTCASE SEC-CERTMAN-PKCS7-0034
START_TESTCASE SEC-CERTMAN-PKCS7-0035
//! @SYMTestCaseID SEC-CERTMAN-PKCS7-0035
RUN_TEST_STEP 100 tpkcs7server EncryptedData C:\tpkcs7\tpkcs7_v2.ini GOOD3_ENCRYPTEDDATA #valid
END_TESTCASE SEC-CERTMAN-PKCS7-0035
START_TESTCASE SEC-CERTMAN-PKCS7-0036
//! @SYMTestCaseID SEC-CERTMAN-PKCS7-0036
RUN_TEST_STEP 100 tpkcs7server EncryptedData C:\tpkcs7\tpkcs7_v2.ini GOOD4_ENCRYPTEDDATA #valid
END_TESTCASE SEC-CERTMAN-PKCS7-0036
START_TESTCASE SEC-CERTMAN-PKCS7-0037
//! @SYMTestCaseID SEC-CERTMAN-PKCS7-0037
RUN_TEST_STEP 100 tpkcs7server EncryptedData C:\tpkcs7\tpkcs7_v2.ini GOOD5_ENCRYPTEDDATA #valid
END_TESTCASE SEC-CERTMAN-PKCS7-0037
START_TESTCASE SEC-CERTMAN-PKCS7-0038
//! @SYMTestCaseID SEC-CERTMAN-PKCS7-0038
RUN_TEST_STEP 100 tpkcs7server EncryptedData C:\tpkcs7\tpkcs7_v2.ini GOOD6_ENCRYPTEDDATA #valid
END_TESTCASE SEC-CERTMAN-PKCS7-0038
START_TESTCASE SEC-CERTMAN-PKCS7-0039
//! @SYMTestCaseID SEC-CERTMAN-PKCS7-0039
RUN_TEST_STEP 100 tpkcs7server EncryptedData C:\tpkcs7\tpkcs7_v2.ini GOOD8_ENCRYPTEDDATA #valid
END_TESTCASE SEC-CERTMAN-PKCS7-0039
START_TESTCASE SEC-CERTMAN-PKCS7-0040
//! @SYMTestCaseID SEC-CERTMAN-PKCS7-0040
RUN_TEST_STEP 100 tpkcs7server EncryptedData C:\tpkcs7\tpkcs7_v2.ini GOOD9_ENCRYPTEDDATA #valid
END_TESTCASE SEC-CERTMAN-PKCS7-0040
START_TESTCASE SEC-CERTMAN-PKCS7-0041
//! @SYMTestCaseID SEC-CERTMAN-PKCS7-0041
RUN_TEST_STEP 100 tpkcs7server EncryptedData C:\tpkcs7\tpkcs7_v2.ini GOOD1_ENCRYPTEDDATA #invalid
END_TESTCASE SEC-CERTMAN-PKCS7-0041
START_TESTCASE SEC-CERTMAN-PKCS7-0042
//! @SYMTestCaseID SEC-CERTMAN-PKCS7-0042
RUN_TEST_STEP 100 tpkcs7server EncryptedDataCorrupt C:\tpkcs7\tpkcs7_v2.ini GOOD7_ENCRYPTEDDATA #invalid
END_TESTCASE SEC-CERTMAN-PKCS7-0042
START_TESTCASE SEC-CERTMAN-PKCS7-0043
//! @SYMTestCaseID SEC-CERTMAN-PKCS7-0043
RUN_TEST_STEP 100 tpkcs7server EncryptedData C:\tpkcs7\tpkcs7_v2.ini GOOD10_ENCRYPTEDDATA #invalid
END_TESTCASE SEC-CERTMAN-PKCS7-0043
START_TESTCASE SEC-CERTMAN-PKCS7-0044
//! @SYMTestCaseID SEC-CERTMAN-PKCS7-0044
RUN_TEST_STEP 100 tpkcs7server EncryptedData C:\tpkcs7\tpkcs7_v2.ini GOOD11_ENCRYPTEDDATA #invalid
END_TESTCASE SEC-CERTMAN-PKCS7-0044
START_TESTCASE SEC-CERTMAN-PKCS7-0045
//! @SYMTestCaseID SEC-CERTMAN-PKCS7-0045
RUN_TEST_STEP 100 tpkcs7server EncryptedData C:\tpkcs7\tpkcs7_v2.ini GOOD13_ENCRYPTEDDATA #invalid
END_TESTCASE SEC-CERTMAN-PKCS7-0045
START_TESTCASE SEC-CERTMAN-PKCS7-0046
//! @SYMTestCaseID SEC-CERTMAN-PKCS7-0046
RUN_TEST_STEP 100 tpkcs7server EncryptedData C:\tpkcs7\tpkcs7_v2.ini GOOD14_ENCRYPTEDDATA #invalid
END_TESTCASE SEC-CERTMAN-PKCS7-0046
START_TESTCASE SEC-CERTMAN-PKCS7-0047
//! @SYMTestCaseID SEC-CERTMAN-PKCS7-0047
RUN_TEST_STEP 100 tpkcs7server EncryptedDataCorrupt C:\tpkcs7\tpkcs7_v2.ini GOOD12_ENCRYPTEDDATA #invalid
END_TESTCASE SEC-CERTMAN-PKCS7-0047
START_TESTCASE SEC-CERTMAN-PKCS7-0048
//! @SYMTestCaseID SEC-CERTMAN-PKCS7-0048
RUN_TEST_STEP 100 tpkcs7server EncryptedDataCorrupt C:\tpkcs7\tpkcs7_v2.ini CORRUPT1 #empty
END_TESTCASE SEC-CERTMAN-PKCS7-0048
START_TESTCASE SEC-CERTMAN-PKCS7-0049
//! @SYMTestCaseID SEC-CERTMAN-PKCS7-0049
RUN_TEST_STEP 100 tpkcs7server EncryptedDataCorrupt C:\tpkcs7\tpkcs7_v2.ini GOODFILE_ENCRYPTEDDATA_Corrupt2 #corrupt
END_TESTCASE SEC-CERTMAN-PKCS7-0049
START_TESTCASE SEC-CERTMAN-PKCS7-0050
//! @SYMTestCaseID SEC-CERTMAN-PKCS7-0050
RUN_TEST_STEP 100 tpkcs7server DigestInfo C:\tpkcs7\tpkcs7_v2.ini GOODFILE_DIGESTINFO #valid
END_TESTCASE SEC-CERTMAN-PKCS7-0050
START_TESTCASE SEC-CERTMAN-PKCS7-0051
//! @SYMTestCaseID SEC-CERTMAN-PKCS7-0051
RUN_TEST_STEP 100 tpkcs7server DigestInfo C:\tpkcs7\tpkcs7_v2.ini GOODFILE_DIGESTINFO1 #invalid
END_TESTCASE SEC-CERTMAN-PKCS7-0051
START_TESTCASE SEC-CERTMAN-PKCS7-0052
//! @SYMTestCaseID SEC-CERTMAN-PKCS7-0052
RUN_TEST_STEP 100 tpkcs7server DigestInfo C:\tpkcs7\tpkcs7_v2.ini GOODFILE_DIGESTINFO2 #Valid
END_TESTCASE SEC-CERTMAN-PKCS7-0052
START_TESTCASE SEC-CERTMAN-PKCS7-0053
//! @SYMTestCaseID SEC-CERTMAN-PKCS7-0053
RUN_TEST_STEP 100 tpkcs7server DigestInfo C:\tpkcs7\tpkcs7_v2.ini GOODFILE_DIGESTINFO3 #inValid
END_TESTCASE SEC-CERTMAN-PKCS7-0053
START_TESTCASE SEC-CERTMAN-PKCS7-0054
//! @SYMTestCaseID SEC-CERTMAN-PKCS7-0054
RUN_TEST_STEP 100 tpkcs7server DigestInfo C:\tpkcs7\tpkcs7_v2.ini GOODFILE_DIGESTINFO4 #inValid
END_TESTCASE SEC-CERTMAN-PKCS7-0054
START_TESTCASE SEC-CERTMAN-PKCS7-0055
//! @SYMTestCaseID SEC-CERTMAN-PKCS7-0055
RUN_TEST_STEP 100 tpkcs7server DigestInfoCorrupt C:\tpkcs7\tpkcs7_v2.ini CORRUPT1 #empty
END_TESTCASE SEC-CERTMAN-PKCS7-0055
START_TESTCASE SEC-CERTMAN-PKCS7-0056
//! @SYMTestCaseID SEC-CERTMAN-PKCS7-0056
RUN_TEST_STEP 100 tpkcs7server DigestInfoCorrupt C:\tpkcs7\tpkcs7_v2.ini GOODFILE_DIGESTINFO_CORRUPT #corrupt
END_TESTCASE SEC-CERTMAN-PKCS7-0056
// OOMTEST
START_TESTCASE SEC-CERTMAN-PKCS7-0057
//! @SYMTestCaseID SEC-CERTMAN-PKCS7-0057
RUN_TEST_STEP 100 tpkcs7server PKCS7OOM C:\tpkcs7\tpkcs7_v2.ini OOMTEST1
END_TESTCASE SEC-CERTMAN-PKCS7-0057
START_TESTCASE SEC-CERTMAN-PKCS7-0058
//! @SYMTestCaseID SEC-CERTMAN-PKCS7-0058
RUN_TEST_STEP 100 tpkcs7server PKCS7OOM C:\tpkcs7\tpkcs7_v2.ini OOMTEST2
END_TESTCASE SEC-CERTMAN-PKCS7-0058
START_TESTCASE SEC-CERTMAN-PKCS7-0059
//! @SYMTestCaseID SEC-CERTMAN-PKCS7-0059
RUN_TEST_STEP 100 tpkcs7server PKCS7OOM C:\tpkcs7\tpkcs7_v2.ini OOMTEST3
END_TESTCASE SEC-CERTMAN-PKCS7-0059