1From e1e4ae13b9c5fb9928c94e05f0fa5c17769fd5bd Mon Sep 17 00:00:00 2001
2From: Jerome Forissier <jerome.forissier@linaro.org>
3Date: Fri, 3 Nov 2023 10:41:57 +0100
4Subject: [PATCH] TEE_Crypto_API.xml
5
6Disabling cases:
7
8- Invoke_Crypto_AllocateOperation_TEE_ALG_MD5_size_not_appropriate (3b-4d-15)
9- Invoke_Crypto_AllocateOperation_TEE_ALG_SHA1_size_not_appropriate (3b-86-3d)
10- Invoke_Crypto_AllocateOperation_TEE_ALG_SHA224_size_not_appropriate (3b-91-91)
11- Invoke_Crypto_AllocateOperation_TEE_ALG_SHA256_size_not_appropriate (3b-c6-3c)
12- Invoke_Crypto_AllocateOperation_TEE_ALG_SHA384_size_not_appropriate (3b-b0-94)
13- Invoke_Crypto_AllocateOperation_TEE_ALG_SHA512_size_not_appropriate (3b-f6-b8)
14
15These tests assume that TEE_AllocateOperation() must reject non-zero
16values for maxKeySize when the algorithm is MD5 or SHA (since the
17parameter is not applicable). But The GlobalPlatform TEE Internal Core
18API v1.1.2 has clarified the requirement, see:
19
20 6.2.1 TEE_AllocateOperation
21
22 [...] The parameter maxKeySize MUST be a valid value as defined in Table
23 5-9 for the algorithm, for algorithms referenced in Table 5-9. For all
24 other algorithms, the maxKeySize parameter may have any value.
25
26Link: https://github.com/OP-TEE/optee_os/pull/6416
27Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
28---
29 packages/Crypto/xmlstable/TEE_Crypto_API.xml | 12 ++++++++++++
30 1 file changed, 12 insertions(+)
31
32diff --git a/packages/Crypto/xmlstable/TEE_Crypto_API.xml b/packages/Crypto/xmlstable/TEE_Crypto_API.xml
33index b824637..b1cd7b0 100644
34--- a/packages/Crypto/xmlstable/TEE_Crypto_API.xml
35+++ b/packages/Crypto/xmlstable/TEE_Crypto_API.xml
36@@ -149178,6 +149178,7 @@
37                 </call>
38             </postamble>
39         </scenario>
40+<!-- AllocateOperation
41         <scenario name="Invoke_Crypto_AllocateOperation_TEE_ALG_MD5_size_not_appropriate (3b-4d-15)" destructive="no">
42             <req name="ALLOCATE_OPERATION_ERROR_NOT_SUPPORTED">
43                 <description><![CDATA[If the mode is not compatible with the algorithm or key size or if the algorithm is not one of the listed algorithms or if maxKeySize is not appropriate for the algorithm.]]></description>
44@@ -149367,6 +149368,7 @@
45                 </call>
46             </postamble>
47         </scenario>
48+-->
49         <scenario name="Invoke_Crypto_AllocateOperation_TEE_ALG_RSAES_PKCS1_OAEP_MGF1_SHA1_mode_not_allowed (3b-8b-3e)" destructive="no">
50             <req name="ALLOCATE_OPERATION_ERROR_NOT_SUPPORTED">
51                 <description><![CDATA[If the mode is not compatible with the algorithm or key size or if the algorithm is not one of the listed algorithms or if maxKeySize is not appropriate for the algorithm.]]></description>
52@@ -156360,6 +156362,7 @@
53                 </call>
54             </postamble>
55         </scenario>
56+<!-- AllocateOperation
57         <scenario name="Invoke_Crypto_AllocateOperation_TEE_ALG_SHA1_size_not_appropriate (3b-86-3d)" destructive="no">
58             <req name="ALLOCATE_OPERATION_ERROR_NOT_SUPPORTED">
59                 <description><![CDATA[If the mode is not compatible with the algorithm or key size or if the algorithm is not one of the listed algorithms or if maxKeySize is not appropriate for the algorithm.]]></description>
60@@ -156549,6 +156552,7 @@
61                 </call>
62             </postamble>
63         </scenario>
64+-->
65         <scenario name="Invoke_Crypto_AllocateOperation_TEE_ALG_SHA224_mode_not_allowed (3b-91-90)" destructive="no">
66             <req name="ALLOCATE_OPERATION_ERROR_NOT_SUPPORTED">
67                 <description><![CDATA[If the mode is not compatible with the algorithm or key size or if the algorithm is not one of the listed algorithms or if maxKeySize is not appropriate for the algorithm.]]></description>
68@@ -156738,6 +156742,7 @@
69                 </call>
70             </postamble>
71         </scenario>
72+<!-- AllocateOperation
73         <scenario name="Invoke_Crypto_AllocateOperation_TEE_ALG_SHA224_size_not_appropriate (3b-91-91)" destructive="no">
74             <req name="ALLOCATE_OPERATION_ERROR_NOT_SUPPORTED">
75                 <description><![CDATA[If the mode is not compatible with the algorithm or key size or if the algorithm is not one of the listed algorithms or if maxKeySize is not appropriate for the algorithm.]]></description>
76@@ -156927,6 +156932,7 @@
77                 </call>
78             </postamble>
79         </scenario>
80+-->
81         <scenario name="Invoke_Crypto_AllocateOperation_TEE_ALG_SHA256_mode_not_allowed (3b-c6-3b)" destructive="no">
82             <req name="ALLOCATE_OPERATION_ERROR_NOT_SUPPORTED">
83                 <description><![CDATA[If the mode is not compatible with the algorithm or key size or if the algorithm is not one of the listed algorithms or if maxKeySize is not appropriate for the algorithm.]]></description>
84@@ -157116,6 +157122,7 @@
85                 </call>
86             </postamble>
87         </scenario>
88+<!-- AllocateOperation
89         <scenario name="Invoke_Crypto_AllocateOperation_TEE_ALG_SHA256_size_not_appropriate (3b-c6-3c)" destructive="no">
90             <req name="ALLOCATE_OPERATION_ERROR_NOT_SUPPORTED">
91                 <description><![CDATA[If the mode is not compatible with the algorithm or key size or if the algorithm is not one of the listed algorithms or if maxKeySize is not appropriate for the algorithm.]]></description>
92@@ -157305,6 +157312,7 @@
93                 </call>
94             </postamble>
95         </scenario>
96+-->
97         <scenario name="Invoke_Crypto_AllocateOperation_TEE_ALG_SHA384_mode_not_allowed (3b-b0-93)" destructive="no">
98             <req name="ALLOCATE_OPERATION_ERROR_NOT_SUPPORTED">
99                 <description><![CDATA[If the mode is not compatible with the algorithm or key size or if the algorithm is not one of the listed algorithms or if maxKeySize is not appropriate for the algorithm.]]></description>
100@@ -157494,6 +157502,7 @@
101                 </call>
102             </postamble>
103         </scenario>
104+<!-- AllocateOperation
105         <scenario name="Invoke_Crypto_AllocateOperation_TEE_ALG_SHA384_size_not_appropriate (3b-b0-94)" destructive="no">
106             <req name="ALLOCATE_OPERATION_ERROR_NOT_SUPPORTED">
107                 <description><![CDATA[If the mode is not compatible with the algorithm or key size or if the algorithm is not one of the listed algorithms or if maxKeySize is not appropriate for the algorithm.]]></description>
108@@ -157683,6 +157692,7 @@
109                 </call>
110             </postamble>
111         </scenario>
112+-->
113         <scenario name="Invoke_Crypto_AllocateOperation_TEE_ALG_SHA512_mode_not_allowed (3b-f6-b7)" destructive="no">
114             <req name="ALLOCATE_OPERATION_ERROR_NOT_SUPPORTED">
115                 <description><![CDATA[If the mode is not compatible with the algorithm or key size or if the algorithm is not one of the listed algorithms or if maxKeySize is not appropriate for the algorithm.]]></description>
116@@ -157872,6 +157882,7 @@
117                 </call>
118             </postamble>
119         </scenario>
120+<!-- AllocateOperation
121         <scenario name="Invoke_Crypto_AllocateOperation_TEE_ALG_SHA512_size_not_appropriate (3b-f6-b8)" destructive="no">
122             <req name="ALLOCATE_OPERATION_ERROR_NOT_SUPPORTED">
123                 <description><![CDATA[If the mode is not compatible with the algorithm or key size or if the algorithm is not one of the listed algorithms or if maxKeySize is not appropriate for the algorithm.]]></description>
124@@ -158061,6 +158072,7 @@
125                 </call>
126             </postamble>
127         </scenario>
128+-->
129     </initial-state>
130     <initial-state name="TEE_Internal_API_Crypto_FreeOperation">
131         <scenario name="Invoke_Crypto_FreeAllKeysAndOperations_Success (30-74-50)" destructive="no">
132--
1332.34.1
134
135