|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectds.ov2.front.Host_testframe
public class Host_testframe
Main class for the host test frame that combines the OV-chip applet
and host driver code to be tested on a standard JVM. The host test
frame is great for debugging the applet code, because here the
applet runs on the PC and it can print any amount of debugging
output. After debugging the same code can run on a real Java Card.
With different preprocessor configurations this file provides the
main class for three host test frames: The host test frame for the
plain RSA applet, the host test frame for the Montgomerizing
applet, and the host test frame for the squaring applet. They are
started with the scripts plainhosttestframe
, monthosttestframe
, and squarehosttestframe
, respectively.
In the host test frame the test stub code is substituted for the
real stub code. Both are generated by the IDL compiler and have the
same public interface. The real stub code calls Host_protocol.run_step
to
communicate to a Java Card or an emulator. Instead the test stub
code calls the applet code directly, causing the applet and the
host driver code to run together on the same JVM.
The three host test frames are very similar to the card test frame
Card_testframe
. Here we describe only the differences and
give a complete list of the options.
Test_state.ptls_param_rounds
many PTLS parameter sets,
writes them to disc and reads them back to see if there are any
differences.
plainhosttestframe
for the Plain
RSA applet, monthosttestframe
for the Montgomerizing RSA
applet, and squarehosttestframe
for the squaring RSA applet.
-jcop, -sun, -c, -r, -list-readers
-ptls-rounds
).
Card_testframe
) are
contained in Testframe
.
Static class.
Nested Class Summary | |
---|---|
(package private) static class |
Host_testframe.Buffered_string_writer
Character stream that collects the contents in a buffer in memory that can be retrieved later. |
Field Summary | |
---|---|
static Option[] |
host_test_frame_options
Array with (only one) host test frame specific option. |
static String |
long_application_name
Long appliation name. |
static String |
short_application_name
Short application name for error messages. |
Constructor Summary | |
---|---|
protected |
Host_testframe()
Static class, object creation disabled. |
Method Summary | |
---|---|
static void |
main(String[] args)
Main method of the host test frames. |
static void |
test_const_size()
Simulate the applet life with several sets of PTLS parameters for the configures base and exponent sizes. |
static void |
test_increase_size()
Simulate the applet life with several sets of PTLS parameters for increasing base and exponent sizes. |
static void |
test_ptls_save()
Test writing/reading PTLS parameters to/from file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String short_application_name
public static final String long_application_name
public static final Option[] host_test_frame_options
Constructor Detail |
---|
protected Host_testframe()
Method Detail |
---|
public static void test_const_size() throws NoSuchAlgorithmException, CardException, IOException
Card_testframe
.
Top level action, called when -test-const
was
specified.
CardException
- on communication errors
IOException
- if the applet cap file is not accessible
NoSuchAlgorithmException
- if no provider for RSA key
generation can be foundpublic static void test_increase_size() throws NoSuchAlgorithmException, CardException, IOException
Card_testframe
.
Top level action, called when -test-size
was
specified.
CardException
- on communication errors
IOException
- if the applet cap file is not accessible
NoSuchAlgorithmException
- if no provider for RSA key
generation can be foundpublic static void test_ptls_save() throws NoSuchAlgorithmException, FileNotFoundException, PTLS_rsa_parameters.PTLS_io_exception
Test_state.ptls_param_rounds
many tests to save a PTLS
parameter set to the disk and read it back.
Top level action, called when -test-ptls-save
was
given.
NoSuchAlgorithmException
- if no provider for RSA key
generation can be found
FileNotFoundException
- if the file with the saved
parameters disappeared
PTLS_rsa_parameters.PTLS_io_exception
public static void main(String[] args) throws NoSuchAlgorithmException, CardException, FileNotFoundException, PTLS_rsa_parameters.PTLS_io_exception, IOException
args
- command line
IOException
- if the applet cap file is not accessible or
a read/write error occurs
NoSuchAlgorithmException
- if no provider for RSA key
generation can be found
FileNotFoundException
- if the file with the saved
parameters disappeared
CardException
- for communication errors with the card
PTLS_rsa_parameters.PTLS_io_exception
- for errors when writing/reading PTLS
parameters
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |