C H A P T E R  47

Smart Card Test(sctest)

The Smart Card test ( sctest ) consists of a series of subtests to exercise smart cards and smart card readers. It exercises the Java TM card terminal reader driver, the Solaris I2C SCM device driver, and the serial device driver.

sctest tests only the internal SC reader. sctest is only run as an intervention test. Users need to initalize SC card and Internal SC reader to run sctest .



Note - Users should initialize the smart card with commands or GUI provided by OS. This initialization information can be found in the Smart Card User Administration Guide at docs.sun.com.





caution icon

Caution - Do not use a smart card with real data for sctest. Allocate a scratch smart card for testing purposes only. Functions of sctest will delete any existing data on the card.





Note - Do not run sctest and sptest at the same time. Test results will conflict if sptest is enabled when sctest is run. (Because it is an intervention test, sptest is disabled by default.)



To select sctest , click the Intervention button in the Select Devices panel.


sctest Test Requirements

The following five requirements must be met before running sctest :

Once you have fulfilled these five requirements, you are ready to run sctest .


sctest Subtests
TABLE 47-1 sctest Subtests

Subtest

Description

Card Presence Detect test

Checks whether a card is present in the reader. Place the card in the reader to begin the test.

Card Lock/Unlock test

Exercises the functions that lock and unlock a card. Place the card in the reader to begin the test.

Insertion/Removal test

Tests detection of card insertion and removal. If the card is already in the reader, remove and reinsert when prompted. This test is disabled by default, since it requires user intervention.

PinCardService test

Waits for a card to be inserted, then performs authentication of the default PIN ( $$$$java ).

Note: this subtest assumes the card has been initialized.

Simple Authentication test

Waits for a card to be inserted, then performs authentication of the default PIN ( $$$$java ). Displays the username and password of an example user called AAA .

This test only works for cards that have been initialized. This subtest requires the PinCardService test to first validate the PIN on the smart card.

UserInfoCardService test

Waits for a card to be inserted, then performs authentication of the default PIN ( $$$$java ). Displays the user information such as the username and password of example user called AAA . If Write mode is enabled, the test will also create default user information for an example user BBB .

If Verbose mode is enabled, this user information will be displayed. Next, the test deletes the user information for BBB . When the test queries for user information for BBB , it expects an exception (since this information is already deleted).

This subtest requires that the PinCardService test has validated the PIN on the smart card.



sctest Options

To reach the dialog box below, right-click on the test name in the System Map and select Test Parameter Options. If you do not see this test in the System Map, you might need to expand the collapsed groups, or your system may not include the device appropriate to this test. Refer to the SunVTS User's Guide for more details.

FIGURE 47-1 sctest Test Parameter Options Dialog Box

TABLE 47-2 sctest Options

sctest Options

Description

Mode

Enables or disables the Write mode for the UserInfoCard Service subtest.

OCF Based tests

Enables or disables all of the following subtests: Card Presence Detect, Card Lock/Unlock, Insertion/Removal, PinCardService, Simple Authentication, and UserInfoCard.

Card Removal test

Enables or disables the Insertion/Removal subtest.



sctest Test Modes
TABLE 47-3 sctest Test Modes

Test Mode

Supported?

Description

Connection

No

Not supported.

Functional

(Offline)

Yes

Runs the full set of tests.



sctest Command-Line Syntax

/opt/SUNWvts/bin/sctest standard_arguments -o dev= a|b|i2cscmN ,Mode =ReadWrite|ReadOnly, OCFBasedTests =Enable|Disable, CardRemovalTest =Enable|Disable

TABLE 47-4 sctest Command-Line Syntax

Argument

Description

dev= a|b|i2cscmN

Names the type of device. The value a or b implies ttya or ttyb . N =0, 1, 2, and so on.

Mode= Enable | Disable

Enables or disables the Write mode for the UserInfoCard Service subtest.

OCFBasedTests= Enable | Disable

Enables or disables all of the following subtests: Card Presence Detect, Card Lock/Unlock, Insertion/Removal, PinCardService, Simple Authentication, and UserInfoCard.

CardRemovalTest= Enable | Disable

Enables or disables the Insertion/Removal subtest.




Note Note - 64-bit tests are located in the sparcv9 subdirectory: /opt/SUNWvts/bin/sparcv9/testname. If a test is not present in this directory, then it may only be available as a 32-bit test. For more information refer to 32-Bit and 64-Bit Tests.