<?xml version="1.0" encoding="UTF-8"?>
<test id="crypto/signtext/5" class="A" scope="crypto" testtype="application" type="manual" source="cyrp#5.1.2" device="both">
  <assertion>If the Operator approves the signing of text using the Crypto.signText function then the Operator must enter a valid WIM PIN for the call to Crypto.signText to proceed.
</assertion>
  <specnote>New for June 2000.  Notes: this assertion requires that a valid WIM PIN is made available to whoever is performing the test.  Also, a device that has WIN capabilities should also be made available.</specnote>
  <results>
    <result>
      <name>submit</name>
      <value>yes</value>
    </result>
  </results>
  <method>
    <![CDATA[<card newcontext="true" id="main">
<p>
The script referenced by this &nbsp; <a href="<script1>#main()">link</a> &nbsp; uses the Crypto.signText function to sign a block of text.
</p>
<p mode="wrap">Did the script ask for a valid WIM PIN?
<br />
<yesno>
</p>
</card>]]>
  </method>
  <scripts>
    <script id="1">
      <![CDATA[extern function main()
{

	var texttosign = "This is a test";
	var options    = 0;
	var keytypeid  = 0;
	var keyid      = "";
	var text = Crypto.signText (texttosign,
	                            options,
	                            keytypeid,
	                            keyid);	

}
]]>
    </script>
  </scripts>
</test>

