<action>
	<actionname>1, Delete keystore data file</actionname>
	<actiontype>deletekeystoredata</actiontype>
	<actionbody>
	</actionbody>
	<actionresult>
		<return>KErrNone</return>
	</actionresult>
</action>

<action>
	<actionname>None</actionname>
	<actiontype>startcancellation</actiontype>
	<actionbody></actionbody>
	<actionresult>
		<return>KErrNone</return>
	</actionresult>
</action>

// Start of testing

<action>
	<actionname>1.2,Opening key store in manager mode</actionname>
	<actiontype>init</actiontype>
	<actionbody>
		<mode>manager</mode>
	</actionbody>
	<actionresult>
		<return>KErrNone</return>
	</actionresult>
</action>

<action>
	<actionname>1.2.0.1 NOT A TEST Delete everything</actionname>
	<actiontype>deletekeys</actiontype>
	<actionbody></actionbody>
	<actionresult>
		<return>KErrNone</return>
	</actionresult>
</action>

<action>
	<actionname>2,Add a key</actionname>
	<actiontype>addkey</actiontype>
	<actionbody>
		<keyusage>allusagesbutNR</keyusage>
		<keysize>512</keysize>
		<keylabel>banana</keylabel>
		<keyalgorithm>RSA</keyalgorithm>
		<keyexportable>IsExportable</keyexportable>
		<keyaccesstype>Extractable</keyaccesstype>
		<passphrase>create pinkcloud</passphrase>
	</actionbody>
	<actionresult>
		<return>KErrNone</return>
	</actionresult>
</action>

///////////////////////////////////////////////////////////////////////////////
//				Test case 3: List the keys, should only find "Banana"
///////////////////////////////////////////////////////////////////////////////

<action>
	<actionname>3 List everything</actionname>
	<actiontype>listkeys</actiontype>
	<actionbody>
		<listcount>1</listcount>
		<foundkey>banana</foundkey>		
	</actionbody>
	<actionresult>
		<return>KErrNone</return>
	</actionresult>
</action>

<action>
	<actionname>3.1,Get it again</actionname>
	<actiontype>getkeyinfo</actiontype>
	<actionbody>
		<keyusage>allusagesbutNR</keyusage>
		<keysize>512</keysize>
		<keylabel>banana</keylabel>
		<keyalgorithm>RSA</keyalgorithm>
		<keyaccesstype>Extractable</keyaccesstype>
		<keyaccesstype>Local</keyaccesstype>
	</actionbody>
	<actionresult>
		<return>KErrNone</return>
	</actionresult>
</action>

<action>
	<actionname>3.3.1,Set passphrase timeout to "don't cache"</actionname>
	<actiontype>settimeout</actiontype>
	<actionbody>
		<keylabel>banana</keylabel>
		<timeout>0</timeout>
	</actionbody>
	<actionresult>
		<return>KErrNone</return>
	</actionresult>
</action>

<action>
	<actionname>3.2,Open it</actionname>
	<actiontype>open</actiontype>
	<actionbody>
		<keylabel>banana</keylabel>
		<open>RSA</open>
	</actionbody>
	<actionresult>
		<return>KErrNone</return>
	</actionresult>
</action>

<action>
	<actionname>3.3,Open a banana for decrypt</actionname>
	<actiontype>open</actiontype>
	<actionbody>
		<keylabel>banana</keylabel>
		<open>Decrypt</open>
	</actionbody>
	<actionresult>
		<return>KErrNone</return>
	</actionresult>
</action>

<action>
	<actionname>3.4, Sign with a banana, 20 char text</actionname>
	<actiontype>sign</actiontype>
	<actionbody>
		<keylabel>banana</keylabel>
		<open>RSA</open>
		<text>This is text of 20 .</text>
		<passphrase>pinkcloud</passphrase>
	</actionbody>
	<actionresult>
		<return>KErrNone</return>
	</actionresult>
</action>

<action>
	<actionname>3.5, Sign digest with a banana</actionname>
	<actiontype>sign</actiontype>
	<actionbody>
		<keylabel>banana</keylabel>
		<open>RSA</open>
		<signdigest>1</signdigest>
		<text>digested!</text>
		<passphrase>pinkcloud</passphrase>
	</actionbody>
	<actionresult>
		<return>KErrNone</return>
	</actionresult>
</action>

<action>
	<actionname>3.6, Decrypt with a banana</actionname>
	<actiontype>decrypt</actiontype>
	<actionbody>
		<keylabel>banana</keylabel>
		<text>Ook!</text>
		<passphrase>pinkcloud</passphrase>
	</actionbody>
	<actionresult>
		<return>KErrNone</return>
	</actionresult>
</action>

///////////////////////////////////////////////////////////////////////////////
//				Test case 4: Delete "Banana" key 
///////////////////////////////////////////////////////////////////////////////

<action>
	<actionname>4. Delete the key</actionname>
	<actiontype>deletekeys</actiontype>
	<actionbody>
		<keyalgorithm>RSA</keyalgorithm>
		<deletecount>1</deletecount>
	</actionbody>
	<actionresult>
		<return>KErrNone</return>
	</actionresult>
</action>


///////////////////////////////////////////////////////////////////////////////
//				Test case 5: List the keys, should find nothing
///////////////////////////////////////////////////////////////////////////////

<action>
	<actionname>5 List everything</actionname>
	<actiontype>listkeys</actiontype>
	<actionbody>
		<listcount>0</listcount>
		
	</actionbody>
	<actionresult>
		<return>KErrNone</return>
	</actionresult>
</action>

<action>
	<actionname>6,Add a larger key</actionname>
	<actiontype>addkey</actiontype>
	<actionbody>
		<keyusage>allusagesbutNR</keyusage>
		<keysize>1024</keysize>
		<keylabel>bigbanana</keylabel>
		<keyalgorithm>RSA</keyalgorithm>
		<keyexportable>IsExportable</keyexportable>
		<keyaccesstype>Extractable</keyaccesstype>
		<passphrase>create pinkcloud</passphrase>		
	</actionbody>
	<actionresult>
		<return>KErrNone</return>
	</actionresult>
</action>

<action>
	<actionname>7,Add a key with a very long label</actionname>
	This is to test passing larger ammounts of data over the client/server 
	boundary.
	<actiontype>addkey</actiontype>
	<actionbody>
		<keyusage>allusagesbutNR</keyusage>
		<keysize>1024</keysize>
		<keylabel>
To be, or not to be: that is the question:
Whether 'tis nobler in the mind to suffer
The slings and arrows of outrageous fortune,
Or to take arms against a sea of troubles,
And by opposing end them? To die: to sleep;
No more; and by a sleep to say we end
The heart-ache and the thousand natural shocks
That flesh is heir to, 'tis a consummation
Devoutly to be wish'd. To die, to sleep;
To sleep: perchance to dream: ay, there's the rub;
For in that sleep of death what dreams may come
When we have shuffled off this mortal coil,
Must give us pause: there's the respect
That makes calamity of so long life;
For who would bear the whips and scorns of time,
The oppressor's wrong, the proud man's contumely,
The pangs of despised love, the law's delay,
The insolence of office and the spurns
That patient merit of the unworthy takes,
When he himself might his quietus make
With a bare bodkin? Who would fardels bear,
To grunt and sweat under a weary life,
But that the dread of something after death,
The undiscover'd country from whose bourn
No traveller returns, puzzles the will
And makes us rather bear those ills we have
Than fly to others that we know not of?
Thus conscience does make cowards of us all;
And thus the native hue of resolution
Is sicklied o'er with the pale cast of thought,
And enterprises of great pith and moment
With this regard their currents turn awry,
And lose the name of action.--Soft you now!
The fair Ophelia! Nymph, in thy orisons
Be all my sins remember'd. 
		</keylabel>
		<keyalgorithm>RSA</keyalgorithm>
		<keyaccesstype>Extractable</keyaccesstype>
		<passphrase>pinkcloud</passphrase>		
	</actionbody>
	<actionresult>
		<return>KErrNone</return>
	</actionresult>
</action>

<action>
	<actionname>8,Get that key again</actionname>
	boundary.
	<actiontype>getkeyinfo</actiontype>
	<actionbody>
		<keyusage>allusagesbutNR</keyusage>
		<keysize>1024</keysize>
		<keylabel>
To be, or not to be: that is the question:
Whether 'tis nobler in the mind to suffer
The slings and arrows of outrageous fortune,
Or to take arms against a sea of troubles,
And by opposing end them? To die: to sleep;
No more; and by a sleep to say we end
The heart-ache and the thousand natural shocks
That flesh is heir to, 'tis a consummation
Devoutly to be wish'd. To die, to sleep;
To sleep: perchance to dream: ay, there's the rub;
For in that sleep of death what dreams may come
When we have shuffled off this mortal coil,
Must give us pause: there's the respect
That makes calamity of so long life;
For who would bear the whips and scorns of time,
The oppressor's wrong, the proud man's contumely,
The pangs of despised love, the law's delay,
The insolence of office and the spurns
That patient merit of the unworthy takes,
When he himself might his quietus make
With a bare bodkin? Who would fardels bear,
To grunt and sweat under a weary life,
But that the dread of something after death,
The undiscover'd country from whose bourn
No traveller returns, puzzles the will
And makes us rather bear those ills we have
Than fly to others that we know not of?
Thus conscience does make cowards of us all;
And thus the native hue of resolution
Is sicklied o'er with the pale cast of thought,
And enterprises of great pith and moment
With this regard their currents turn awry,
And lose the name of action.--Soft you now!
The fair Ophelia! Nymph, in thy orisons
Be all my sins remember'd. 
		</keylabel>
		<keyalgorithm>RSA</keyalgorithm>
		<keyaccesstype>Extractable</keyaccesstype>
		<keyaccesstype>Local</keyaccesstype>
	</actionbody>
	<actionresult>
		<return>KErrNone</return>
	</actionresult>
</action>

<action>
	<actionname>9,Open that key again</actionname>
	<actiontype>open</actiontype>
	<actionbody>
		<keylabel>
To be, or not to be: that is the question:
Whether 'tis nobler in the mind to suffer
The slings and arrows of outrageous fortune,
Or to take arms against a sea of troubles,
And by opposing end them? To die: to sleep;
No more; and by a sleep to say we end
The heart-ache and the thousand natural shocks
That flesh is heir to, 'tis a consummation
Devoutly to be wish'd. To die, to sleep;
To sleep: perchance to dream: ay, there's the rub;
For in that sleep of death what dreams may come
When we have shuffled off this mortal coil,
Must give us pause: there's the respect
That makes calamity of so long life;
For who would bear the whips and scorns of time,
The oppressor's wrong, the proud man's contumely,
The pangs of despised love, the law's delay,
The insolence of office and the spurns
That patient merit of the unworthy takes,
When he himself might his quietus make
With a bare bodkin? Who would fardels bear,
To grunt and sweat under a weary life,
But that the dread of something after death,
The undiscover'd country from whose bourn
No traveller returns, puzzles the will
And makes us rather bear those ills we have
Than fly to others that we know not of?
Thus conscience does make cowards of us all;
And thus the native hue of resolution
Is sicklied o'er with the pale cast of thought,
And enterprises of great pith and moment
With this regard their currents turn awry,
And lose the name of action.--Soft you now!
The fair Ophelia! Nymph, in thy orisons
Be all my sins remember'd. 
		</keylabel>
		<open>RSA</open>
	</actionbody>
	<actionresult>
		<return>KErrNone</return>
	</actionresult>
</action>

<action>
	<actionname>1.1.5.6,Add a key</actionname>
	<actiontype>addkey</actiontype>
	<actionbody>
		<keyusage>DSAUsage</keyusage>
		<keysize>512</keysize>
		<keylabel>carrot</keylabel>
		<keyalgorithm>DSA</keyalgorithm>
		<keyaccesstype>Extractable</keyaccesstype>
		<passphrase>pinkcloud</passphrase>
	</actionbody>
	<actionresult>
		<return>KErrNone</return>
	</actionresult>
</action>

<action>
	<actionname>1.1.5.6.1, Sign with a carrot, 20 char text</actionname>
	<actiontype>sign</actiontype>
	<actionbody>
		<keylabel>carrot</keylabel>
		<open>DSA</open>
		<text>This is text of 20 .</text>
		<passphrase>pinkcloud</passphrase>
	</actionbody>
	<actionresult>
		<return>KErrNone</return>
	</actionresult>
</action>

<action>
	<actionname>1.1.5.7,Add a key</actionname>
	<actiontype>addkey</actiontype>
	<actionbody>
		<keyusage>Derive</keyusage>
		<keysize>512</keysize>
		<keylabel>mango</keylabel>
		<keyalgorithm>DH</keyalgorithm>
		<keyaccesstype>Extractable</keyaccesstype>
		<passphrase>pinkcloud</passphrase>
	</actionbody>
	<actionresult>
		<return>KErrNone</return>
	</actionresult>
</action>

<action>
	<actionname>1.1.5.7.1,Open it</actionname>
	<actiontype>open</actiontype>
	<actionbody>
		<keylabel>mango</keylabel>
		<open>DH</open>
	</actionbody>
	<actionresult>
		<return>KErrNone</return>
	</actionresult>
</action>

<action>
	<actionname>1.1.5.7.2, Test derive</actionname>
	<actiontype>derive</actiontype>
	<actionbody>
		<keylabel>mango</keylabel>
		<n>DA9A18547FF03B385CC16508C173A7EF4EB61CB40EF8FEF3B31F145051676166BCDC3FE6B799FC394D08C26385F9413F896E09117E46209D6923602683CEA100924A6EE695281775C619DAA94EA8CB3691B4275B0183F1D39639EBC92995FE645D6C1BC28D409E585549BBD2C5DCDD6C208B04EADD8B7A6D997F72CBAD88390F</n>
		<g>02</g>
		<passphrase>pinkcloud</passphrase>
		<passphrase>pinkcloud</passphrase>
	</actionbody>
	<actionresult>
		<return>KErrNone</return>
	</actionresult>
</action>

<action>
	<actionname>10,Add a key with illegal usage</actionname>
	<actiontype>addkey</actiontype>
	<actionbody>
		<keyusage>Sign</keyusage>
		<keysize>512</keysize>
		<keylabel>jackfruit</keylabel>
		<keyalgorithm>DH</keyalgorithm>
		<keyaccesstype>Extractable</keyaccesstype>
		<passphrase>pinkcloud</passphrase>
	</actionbody>
	<actionresult>
		<return>KErrNone</return>
	</actionresult>
</action>

<action>
	<actionname>11,Add a key with illegal usage</actionname>
	<actiontype>addkey</actiontype>
	<actionbody>
		<keyusage>Derive</keyusage>
		<keysize>512</keysize>
		<keylabel>custard apple</keylabel>
		<keyalgorithm>DSA</keyalgorithm>
		<keyaccesstype>Extractable</keyaccesstype>
		<passphrase>pinkcloud</passphrase>
	</actionbody>
	<actionresult>
		<return>KErrNone</return>
	</actionresult>
</action>

<action>
	<actionname>12,Add a key with illegal usage</actionname>
	<actiontype>addkey</actiontype>
	<actionbody>
		<keyusage>Sign</keyusage>
		<keyusage>NR</keyusage>
		<keyusage>Derive</keyusage>
		<keysize>512</keysize>
		<keylabel>grape</keylabel>
		<keyalgorithm>DSA</keyalgorithm>
		<keyaccesstype>Extractable</keyaccesstype>
		<passphrase>pinkcloud</passphrase>
	</actionbody>
	<actionresult>
		<return>KErrNone</return>
	</actionresult>
</action>

<action>
	<actionname>13 List everything (including illegal usage keys)</actionname>
	<actiontype>listkeys</actiontype>
	<actionbody>
		<listcount>7</listcount>
   		<foundkey>bigbanana</foundkey>
		<foundkey>carrot</foundkey>
		<foundkey>mango</foundkey>
		<foundkey>
To be, or not to be: that is the question:
Whether 'tis nobler in the mind to suffer
The slings and arrows of outrageous fortune,
Or to take arms against a sea of troubles,
And by opposing end them? To die: to sleep;
No more; and by a sleep to say we end
The heart-ache and the thousand natural shocks
That flesh is heir to, 'tis a consummation
Devoutly to be wish'd. To die, to sleep;
To sleep: perchance to dream: ay, there's the rub;
For in that sleep of death what dreams may come
When we have shuffled off this mortal coil,
Must give us pause: there's the respect
That makes calamity of so long life;
For who would bear the whips and scorns of time,
The oppressor's wrong, the proud man's contumely,
The pangs of despised love, the law's delay,
The insolence of office and the spurns
That patient merit of the unworthy takes,
When he himself might his quietus make
With a bare bodkin? Who would fardels bear,
To grunt and sweat under a weary life,
But that the dread of something after death,
The undiscover'd country from whose bourn
No traveller returns, puzzles the will
And makes us rather bear those ills we have
Than fly to others that we know not of?
Thus conscience does make cowards of us all;
And thus the native hue of resolution
Is sicklied o'er with the pale cast of thought,
And enterprises of great pith and moment
With this regard their currents turn awry,
And lose the name of action.--Soft you now!
The fair Ophelia! Nymph, in thy orisons
Be all my sins remember'd. 
		</foundkey>	
   		<foundkey>jackfruit</foundkey>
   		<foundkey>custard apple</foundkey>
   		<foundkey>grape</foundkey>
	</actionbody>
	<actionresult>
		<return>KErrNone</return>
	</actionresult>
</action>

<action>
	<actionname>14 List DSA keys (including illegal usage keys)</actionname>
	<actiontype>listkeys</actiontype>
	<actionbody>
		<keyalgorithm>DSA</keyalgorithm>
   		<listcount>3</listcount>
   		<foundkey>carrot</foundkey>
   		<foundkey>custard apple</foundkey>
   		<foundkey>grape</foundkey>
	</actionbody>
	<actionresult>
		<return>KErrNone</return>
	</actionresult>
</action>

<action>
	<actionname>15 List Sign-usage keys (including illegal usage keys)</actionname>
	<actiontype>listkeys</actiontype>
	<actionbody>
		<keyusage>DSAUsage</keyusage>
   		<listcount>5</listcount>
   		<foundkey>bigbanana</foundkey>
   		<foundkey>carrot</foundkey>
		<foundkey>
To be, or not to be: that is the question:
Whether 'tis nobler in the mind to suffer
The slings and arrows of outrageous fortune,
Or to take arms against a sea of troubles,
And by opposing end them? To die: to sleep;
No more; and by a sleep to say we end
The heart-ache and the thousand natural shocks
That flesh is heir to, 'tis a consummation
Devoutly to be wish'd. To die, to sleep;
To sleep: perchance to dream: ay, there's the rub;
For in that sleep of death what dreams may come
When we have shuffled off this mortal coil,
Must give us pause: there's the respect
That makes calamity of so long life;
For who would bear the whips and scorns of time,
The oppressor's wrong, the proud man's contumely,
The pangs of despised love, the law's delay,
The insolence of office and the spurns
That patient merit of the unworthy takes,
When he himself might his quietus make
With a bare bodkin? Who would fardels bear,
To grunt and sweat under a weary life,
But that the dread of something after death,
The undiscover'd country from whose bourn
No traveller returns, puzzles the will
And makes us rather bear those ills we have
Than fly to others that we know not of?
Thus conscience does make cowards of us all;
And thus the native hue of resolution
Is sicklied o'er with the pale cast of thought,
And enterprises of great pith and moment
With this regard their currents turn awry,
And lose the name of action.--Soft you now!
The fair Ophelia! Nymph, in thy orisons
Be all my sins remember'd. 
		</foundkey>
   		<foundkey>jackfruit</foundkey>
   		<foundkey>grape</foundkey>
	</actionbody>
	<actionresult>
		<return>KErrNone</return>
	</actionresult>
</action>

<action>
	<actionname>16 List 'All usages' keys (including illegal usage keys)</actionname>
	<actiontype>listkeys</actiontype>
	<actionbody>
		<keyusage>allusagesbutNR</keyusage>
		<listcount>5</listcount>
   		<foundkey>jackfruit</foundkey>
		<foundkey>carrot</foundkey>
		<foundkey>
To be, or not to be: that is the question:
Whether 'tis nobler in the mind to suffer
The slings and arrows of outrageous fortune,
Or to take arms against a sea of troubles,
And by opposing end them? To die: to sleep;
No more; and by a sleep to say we end
The heart-ache and the thousand natural shocks
That flesh is heir to, 'tis a consummation
Devoutly to be wish'd. To die, to sleep;
To sleep: perchance to dream: ay, there's the rub;
For in that sleep of death what dreams may come
When we have shuffled off this mortal coil,
Must give us pause: there's the respect
That makes calamity of so long life;
For who would bear the whips and scorns of time,
The oppressor's wrong, the proud man's contumely,
The pangs of despised love, the law's delay,
The insolence of office and the spurns
That patient merit of the unworthy takes,
When he himself might his quietus make
With a bare bodkin? Who would fardels bear,
To grunt and sweat under a weary life,
But that the dread of something after death,
The undiscover'd country from whose bourn
No traveller returns, puzzles the will
And makes us rather bear those ills we have
Than fly to others that we know not of?
Thus conscience does make cowards of us all;
And thus the native hue of resolution
Is sicklied o'er with the pale cast of thought,
And enterprises of great pith and moment
With this regard their currents turn awry,
And lose the name of action.--Soft you now!
The fair Ophelia! Nymph, in thy orisons
Be all my sins remember'd. 
		</foundkey>	
   		<foundkey>jackfruit</foundkey>
   		<foundkey>grape</foundkey>
	</actionbody>
	<actionresult>
		<return>KErrNone</return>
	</actionresult>
</action>

<action>
	<actionname>17, Delete RSA keys</actionname>
	<actiontype>deletekeys</actiontype>
	<actionbody>
		<keyalgorithm>RSA</keyalgorithm>
		<deletecount>2</deletecount>	
	</actionbody>
	<actionresult>
		<return>KErrNone</return>
	</actionresult>
</action>

<action>
	<actionname>18 List RSA keys</actionname>
	<actiontype>listkeys</actiontype>
	<actionbody>
		<keyalgorithm>RSA</keyalgorithm>
		<listcount>0</listcount>		
	</actionbody>
	<actionresult>
		<return>KErrNone</return>
	</actionresult>
</action>

<action>
	<actionname>19 List everything (including illegal usage keys)</actionname>
	<actiontype>listkeys</actiontype>
	<actionbody>
		<listcount>5</listcount>
		<foundkey>carrot</foundkey>
		<foundkey>mango</foundkey>
   		<foundkey>jackfruit</foundkey>
   		<foundkey>custard apple</foundkey>
   		<foundkey>grape</foundkey>
	</actionbody>
	<actionresult>
		<return>KErrNone</return>
	</actionresult>
</action>

<action>
	<actionname>20,Add a key that was previously deleted</actionname>
	<actiontype>addkey</actiontype>
	<actionbody>
		<keyusage>allusagesbutNR</keyusage>
		<keysize>512</keysize>
		<keylabel>banana</keylabel>
		<keyalgorithm>RSA</keyalgorithm>
		<keyaccesstype>Extractable</keyaccesstype>
		<passphrase>pinkcloud</passphrase>				
	</actionbody>
	<actionresult>
		<return>KErrNone</return>
	</actionresult>
</action>

<action>
	<actionname>21 List RSA keys</actionname>
	<actiontype>listkeys</actiontype>
	<actionbody>
		<keyalgorithm>RSA</keyalgorithm>
		<listcount>1</listcount>		
	</actionbody>
	<actionresult>
		<return>KErrNone</return>
	</actionresult>
</action>

<action>
	<actionname>22 List everything (including illegal usage keys)</actionname>
	<actiontype>listkeys</actiontype>
	<actionbody>
		<listcount>6</listcount>
		<foundkey>carrot</foundkey>
		<foundkey>mango</foundkey>
		<foundkey>banana</foundkey>
   		<foundkey>jackfruit</foundkey>
   		<foundkey>custard apple</foundkey>
   		<foundkey>grape</foundkey>
	</actionbody>
	<actionresult>
		<return>KErrNone</return>
	</actionresult>
</action>

<action>
	<actionname>23, Delete it again</actionname>
	<actiontype>deletekeys</actiontype>
	<actionbody>
		<keyalgorithm>RSA</keyalgorithm>
		<deletecount>1</deletecount>		
	</actionbody>
	<actionresult>
		<return>KErrNone</return>
	</actionresult>
</action>

<action>
	<actionname>24, Delete everything</actionname>
	<actiontype>deletekeys</actiontype>
	<actionbody>
		<deletecount>5</deletecount>
	</actionbody>
	<actionresult>
		<return>KErrNone</return>
	</actionresult>
</action>

<action>
	<actionname>25 List everything</actionname>
	<actiontype>listkeys</actiontype>
	<actionbody>
		<listcount>0</listcount>
		 
	</actionbody>
	<actionresult>
		<return>KErrNone</return>
	</actionresult>
</action>

// Test importing keys

<action>
<actionname>26, Import a PKCS5 encrypted DSA key</actionname>
	<actiontype>importkey</actiontype>
	<actionbody>
		<ImportData>encryptPK8dsa4DER.txt</ImportData>
		<keyusage>DSAUsage</keyusage>
		<keylabel>*IMPORTED* encrypted purple plum</keylabel>
		<keyaccesstype>Extractable</keyaccesstype>
		<encrypted>1</encrypted>
		<passphrase>import clanger</passphrase>
		<passphrase>create pinkcloud</passphrase>
	</actionbody>
	<actionresult>
		<return>KErrNone</return>
	</actionresult>
</action>

<action>
	<actionname>27, List DSA keys (TEST ID: GT0140-KEY001)</actionname>
	<actiontype>listkeys</actiontype>
	<actionbody>
		<keyalgorithm>DSA</keyalgorithm>
		<listcount>1</listcount>
		<foundkey>*IMPORTED* encrypted purple plum</foundkey>
	</actionbody>
	<actionresult>
		<return>KErrNone</return>
	</actionresult>
</action>

<action>
	<actionname>28, Delete everything</actionname>
	<actiontype>deletekeys</actiontype>
	<actionbody>
		<deletecount>1</deletecount>		
	</actionbody>
	<actionresult>
		<return>KErrNone</return>
	</actionresult>
</action>

// Test export

<action>
<actionname>1.1.1 Import a RSA key</actionname>
	<actiontype>importkey</actiontype>
	<actionbody>
		<ImportData>pkcs8rsa.001</ImportData>
		<keyusage>allusagesbutNR</keyusage>
		<keylabel>gm0RSA</keylabel>
		<keyaccesstype>Extractable</keyaccesstype>
		<encrypted>0</encrypted>
		<passphrase>create pinkcloud</passphrase>
	</actionbody>
	<actionresult>
		<return>KErrNone</return>
	</actionresult>
</action>


<action>
	<actionname>1.1.0.1, Set passphrase timeout to "don't cache"</actionname>
	<actiontype>settimeout</actiontype>
	<actionbody>
		<keylabel>gm0</keylabel>
		<timeout>0</timeout>
	</actionbody>
	<actionresult>
		<return>KErrNone</return>
	</actionresult>
</action>

<action>
<actionname>1.1.5 Export a RSA key</actionname>
	<actiontype>exportkey</actiontype>
	<actionbody>
		<ExportFile>oom_export_pkcs8rsa_0.001</ExportFile>
		<keyusage>allusagesbutNR</keyusage>
		<keylabel>gm0RSA</keylabel>
		<keyalgorithm>RSA</keyalgorithm>
		<encrypted>0</encrypted>
		<passphrase>pinkcloud</passphrase>
	</actionbody>
	<actionresult>
		<return>KErrNone</return>
	</actionresult>
</action>


<action>
<actionname>1.4.1 Import a DSA key</actionname>
	<actiontype>importkey</actiontype>
	<actionbody>
		<ImportData>pkcs8dsa.001</ImportData>
		<keyusage>DSAUsage</keyusage>
		<keylabel>gm0DSA</keylabel>
		<keyaccesstype>Extractable</keyaccesstype>
		<encrypted>0</encrypted>
		<passphrase>pinkcloud</passphrase>
	</actionbody>
	<actionresult>
		<return>KErrNone</return>
	</actionresult>
</action>


<action>
<actionname>1.4.6 Export a DSA key</actionname>
	<actiontype>exportkey</actiontype>
	<actionbody>
		<ExportFile>oom_export_pkcs8dsa_0.001</ExportFile>
		<keyusage>DSAUsage</keyusage>
		<keylabel>gm0DSA</keylabel>
		<keyalgorithm>DSA</keyalgorithm>
		<encrypted>0</encrypted>
		<passphrase>pinkcloud</passphrase>
	</actionbody>
	<actionresult>
		<return>KErrNone</return>
	</actionresult>
</action>


<action>
<actionname>1.7.6 Export a RSA key in encrypted format</actionname>
	<actiontype>exportkey</actiontype>
	<actionbody>
		<ExportFile>oom_encrypted_export_pkcs8rsa.001</ExportFile>
		<keyusage>allusagesbutNR</keyusage>
		<keylabel>gm0RSA</keylabel>
		<keyalgorithm>RSA</keyalgorithm>
		<encrypted>1</encrypted>
		<passphrase>pinkcloud</passphrase>
		<passphrase>export clanger</passphrase>
	</actionbody>
	<actionresult>
		<return>KErrNone</return>
	</actionresult>
</action>


<action>
<actionname>1.9.6 Export a DSA key in encrypted format</actionname>
	<actiontype>exportkey</actiontype>
	<actionbody>
		<ExportFile>oom_encrypted_export_pkcs8dsa.001</ExportFile>
		<keyusage>DSAUsage</keyusage>
		<keylabel>gm0DSA</keylabel>
		<keyalgorithm>DSA</keyalgorithm>
		<encrypted>1</encrypted>
		<passphrase>pinkcloud</passphrase>
		<passphrase>export clanger</passphrase>
	</actionbody>
	<actionresult>
		<return>KErrNone</return>
	</actionresult>
</action>

<action>
	<actionname>1.10.0 NOT A TEST Delete everything 
                    ** Basic sanity check for PKCS8 encrypted DSA key import/export **</actionname>
	<actiontype>deletekeys</actiontype>
	<actionbody></actionbody>
	<actionresult>
		<return>KErrNone</return>
	</actionresult>
</action>


// Test authentication objects (snippets of authobjects.txt)

<action>
	<actionname>2.1, Add a key</actionname>
	<actiontype>addkey</actiontype>
	<actionbody>
		<keyusage>allusagesbutNR</keyusage>
		<keysize>512</keysize>
		<keylabel>banana</keylabel>
		<keyalgorithm>RSA</keyalgorithm>
		<keyaccesstype>Extractable</keyaccesstype>
		<passphrase>create flyingelephant</passphrase>
	</actionbody>
	<actionresult>
		<return>KErrNone</return>
	</actionresult>
</action>

<action>
	<actionname>2.2, List protected objects</actionname>
	<actiontype>listprotectedobjects</actiontype>
	<actionbody>
		<keylabel>banana</keylabel>
		<foundkey>banana</foundkey>
	</actionbody>
	<actionresult>
		<return>KErrNone</return>
	</actionresult>
</action>

<action>
	<actionname>3.5, Change the passphrase</actionname>
	<actiontype>changepassphrase</actiontype>
	<actionbody>
		<keylabel>banana</keylabel>
		<passphrase>change flyingelephant redfox</passphrase>
	</actionbody>
	<actionresult>
		<return>KErrNone</return>
	</actionresult>
</action>

<action>
	<actionname>0.7.2, Set passphrase timeout to 15 seconds</actionname>
	<actiontype>settimeout</actiontype>
	<actionbody>
		<keylabel>banana</keylabel>
		<timeout>15</timeout>
	</actionbody>
	<actionresult>
		<return>KErrNone</return>
	</actionresult>
</action>

<action>
	<actionname>1.1.2, Get timeout, expect 15 seconds</actionname>
	<actiontype>gettimeout</actiontype>
	<actionbody>
		<keylabel>banana</keylabel>
		<timeout>15</timeout>
	</actionbody>
	<actionresult>
		<return>KErrNone</return>
	</actionresult>
</action>

<action>
	<actionname>1.4.1.5, Open banana</actionname>
	<actiontype>authopen</actiontype>
	<actionbody>
		<keylabel>banana</keylabel>
		<passphrase>redfox</passphrase>
	</actionbody>
	<actionresult>
		<return>KErrNone</return>
	</actionresult>
</action>

<action>
	<actionname>1.3.1, Get time remaining, expect 15 seconds</actionname>
	<actiontype>timeremaining</actiontype>
	<actionbody>
		<keylabel>banana</keylabel>
		<timeout>15</timeout>
	</actionbody>
	<actionresult>
		<return>KErrNone</return>
	</actionresult>
</action>

<action>
	<actionname>1.4.2.2, Close object</actionname>
	<actiontype>authclose</actiontype>
	<actionbody>
		<keylabel>banana</keylabel>
	</actionbody>
	<actionresult>
		<return>KErrNone</return>
	</actionresult>
</action>

<action>
	<actionname>3.8, Delete everything</actionname>
	<actiontype>deletekeys</actiontype>
	<actionbody>
		<deletecount>1</deletecount>
	</actionbody>
	<actionresult>
		<return>KErrNone</return>
	</actionresult>
</action>

// End of testing

<action>
	<actionname>29,Closing key store</actionname>
	<actiontype>delete</actiontype>
	<actionbody></actionbody>
	<actionresult>
		<return>KErrNone</return>
	</actionresult>
</action>

<action>
	<actionname>999.1</actionname>
	<actiontype>stopcancellation</actiontype>
	<actionbody></actionbody>
	<actionresult>
		<return>KErrNone</return>
	</actionresult>
</action>

<action>
	<actionname>999.2, Sleep 5 seconds</actionname>
	<actiontype>sleep</actiontype>
	<actionbody>
          <seconds>5</seconds>
        </actionbody>
	<actionresult>
		<return>KErrNone</return>
	</actionresult>
</action>

<action>
	<actionname>999.3, Check for server heap error</actionname>
	<actiontype>checkserverheaperror</actiontype>
	<actionbody>
    </actionbody>
	<actionresult>
		<return>KErrNone</return>
	</actionresult>
</action>
