cryptoservices/filebasedcertificateandkeystores/test/tkeystore/scripts/capability_useauth.ini
[SEC-CAPABILITY_USEAUTH-0001-002]
<actionbody>
<mode>manager</mode>
</actionbody>
[SEC-CAPABILITY_USEAUTH-0001-003]
<actionbody>
<keyusage>allusagesbutNR</keyusage>
<keysize>512</keysize>
<keylabel>additionalkey</keylabel>
<keyalgorithm>RSA</keyalgorithm>
<keyaccesstype>Extractable</keyaccesstype>
<authexpression>strong</authexpression>
<freshness>200</freshness>
</actionbody>
[SEC-CAPABILITY_USEAUTH-0002-001]
<actionbody>
<testexe>t_keystore.exe</testexe>
<excludedcapabilities>
<capability>TCB</capability>
</excludedcapabilities>
<policy>
<capability>WriteUserData</capability>
</policy>
<preactions>
<action>
<actionname>1, Open key store in manager mode</actionname>
<actiontype>init</actiontype>
<actionbody>
<mode>manager</mode>
</actionbody>
<actionresult>
<return>KErrNone</return>
</actionresult>
</action>
</preactions>
<passactions>
<action>
<actionname>Add key banana</actionname>
<actiontype>addkey</actiontype>
<actionbody>
<keyusage>allusagesbutNR</keyusage>
<keysize>512</keysize>
<keylabel>banana</keylabel>
<keyalgorithm>RSA</keyalgorithm>
<keyaccesstype>Extractable</keyaccesstype>
<authexpression>strong</authexpression>
<freshness>20</freshness>
</actionbody>
<actionresult>
<return>KErrNone</return>
</actionresult>
</action>
<action>
<actionname>1.1.0 Import a RSA key</actionname>
<actiontype>importkey</actiontype>
<actionbody>
<ImportData>pkcs8rsa.001</ImportData>
<keyusage>allusagesbutNR</keyusage>
<keylabel>gm0</keylabel>
<keyaccesstype>Extractable</keyaccesstype>
<authexpression>strong</authexpression>
<freshness>25</freshness>
</actionbody>
<actionresult>
<return>KErrNone</return>
</actionresult>
</action>
<action>
<actionname>Import a key</actionname>
<actiontype>importkey</actiontype>
<actionbody>
<ImportData>export_pkcs8rsa_0_3DES_CBC.001</ImportData>
<keyusage>allusagesbutNR</keyusage>
<keylabel>gm_export_pkcs8rsa_0_3DES_CBC.001</keylabel>
<keyalgorithm>RSA</keyalgorithm>
<keyaccesstype>Extractable</keyaccesstype>
<encrypted>1</encrypted>
<passphrase>import clanger</passphrase>
<disabledialogcheck>1</disabledialogcheck>
<authexpression>strong</authexpression>
<freshness>50</freshness>
</actionbody>
<actionresult>
<return>KErrNone</return>
</actionresult>
</action>
</passactions>
<failactions>
<action>
<actionname>Add key banana</actionname>
<actiontype>addkey</actiontype>
<actionbody>
<keyusage>allusagesbutNR</keyusage>
<keysize>512</keysize>
<keylabel>banana</keylabel>
<keyalgorithm>RSA</keyalgorithm>
<keyaccesstype>Extractable</keyaccesstype>
<authexpression>strong</authexpression>
<freshness>20</freshness>
</actionbody>
<actionresult>
<return>KErrPermissionDenied</return>
</actionresult>
</action>
<action>
<actionname>1.1.0 Import a RSA key</actionname>
<actiontype>importkey</actiontype>
<actionbody>
<ImportData>pkcs8rsa.001</ImportData>
<keyusage>allusagesbutNR</keyusage>
<keylabel>gm0</keylabel>
<keyaccesstype>Extractable</keyaccesstype>
<authexpression>strong</authexpression>
<freshness>25</freshness>
</actionbody>
<actionresult>
<return>KErrPermissionDenied</return>
</actionresult>
</action>
<action>
<actionname>Import a key</actionname>
<actiontype>importkey</actiontype>
<actionbody>
<ImportData>export_pkcs8rsa_0_3DES_CBC.001</ImportData>
<keyusage>allusagesbutNR</keyusage>
<keylabel>gm_export_pkcs8rsa_0_3DES_CBC.001</keylabel>
<keyalgorithm>RSA</keyalgorithm>
<keyaccesstype>Extractable</keyaccesstype>
<encrypted>1</encrypted>
<passphrase>import clanger</passphrase>
<disabledialogcheck>1</disabledialogcheck>
<authexpression>strong</authexpression>
<freshness>50</freshness>
</actionbody>
<actionresult>
<return>KErrPermissionDenied</return>
</actionresult>
</action>
</failactions>
<postactions>
<action>
<actionname>5, Close key store</actionname>
<actiontype>delete</actiontype>
<actionbody></actionbody>
<actionresult>
<return>KErrNone</return>
</actionresult>
</action>
</postactions>
</actionbody>
[SEC-CAPABILITY_USEAUTH-0002-002]
<actionbody>
<testexe>t_keystore.exe</testexe>
<excludedcapabilities>
<capability>TCB</capability>
</excludedcapabilities>
<policy>
<capability>ReadUserData</capability>
<capability>WriteUserData</capability>
</policy>
<preactions>
<action>
<actionname>1, Open key store in manager mode</actionname>
<actiontype>init</actiontype>
<actionbody>
<mode>manager</mode>
</actionbody>
<actionresult>
<return>KErrNone</return>
</actionresult>
</action>
</preactions>
<passactions>
<action>
<actionname>Set a authentication policy for a key </actionname>
<actiontype>authenticationpolicy</actiontype>
<actionbody>
<authmode>set</authmode>
<keylabel>gm_export_pkcs8rsa_0_3DES_CBC.001</keylabel>
<authexpression>medium</authexpression>
<freshness>0</freshness>
</actionbody>
<actionresult>
<return>KErrNone</return>
</actionresult>
</action>
</passactions>
<failactions>
<action>
<actionname>Set a authentication policy for a key </actionname>
<actiontype>authenticationpolicy</actiontype>
<actionbody>
<authmode>set</authmode>
<keylabel>gm_export_pkcs8rsa_0_3DES_CBC.001</keylabel>
<authexpression>medium</authexpression>
<freshness>0</freshness>
</actionbody>
<actionresult>
<return>KErrPermissionDenied</return>
</actionresult>
</action>
</failactions>
<postactions>
<action>
<actionname>5, Close key store</actionname>
<actiontype>delete</actiontype>
<actionbody></actionbody>
<actionresult>
<return>KErrNone</return>
</actionresult>
</action>
</postactions>
</actionbody>
[SEC-CAPABILITY_USEAUTH-0002-003]
<actionbody>
<testexe>t_keystore.exe</testexe>
<excludedcapabilities>
<capability>TCB</capability>
</excludedcapabilities>
<policy>
<capability>ReadUserData</capability>
</policy>
<preactions>
<action>
<actionname>1, Open key store in manager mode</actionname>
<actiontype>init</actiontype>
<actionbody>
<mode>manager</mode>
</actionbody>
<actionresult>
<return>KErrNone</return>
</actionresult>
</action>
</preactions>
<passactions>
<action>
<actionname>Try to get authentication policy for a key</actionname>
<actiontype>authenticationpolicy</actiontype>
<actionbody>
<authmode>get</authmode>
<keylabel>additionalkey</keylabel>
<expectedexpression>strong</expectedexpression>
<expectedfreshness>200</expectedfreshness>
</actionbody>
<actionresult>
<return>KErrNone</return>
</actionresult>
</action>
</passactions>
<failactions>
<action>
<actionname>Try to get authentication policy for a key</actionname>
<actiontype>authenticationpolicy</actiontype>
<actionbody>
<authmode>get</authmode>
<keylabel>additionalkey</keylabel>
<expectedexpression>strong</expectedexpression>
<expectedfreshness>200</expectedfreshness>
</actionbody>
<actionresult>
<return>KErrPermissionDenied</return>
</actionresult>
</action>
</failactions>
<postactions>
<action>
<actionname>5, Close key store</actionname>
<actiontype>delete</actiontype>
<actionbody></actionbody>
<actionresult>
<return>KErrNone</return>
</actionresult>
</action>
</postactions>
</actionbody>
[SEC-CAPABILITY_USEAUTH-0003-002]
<actionbody>
<seconds>5</seconds>
</actionbody>