Modify test suite

This commit is contained in:
NIIBE Yutaka
2014-12-12 15:06:22 +09:00
parent c54bb0c559
commit b6db3b449e
5 changed files with 38 additions and 3 deletions

View File

@@ -1,5 +1,12 @@
2014-12-12 Niibe Yutaka <gniibe@fsij.org>
* test/features/802_get_data_static.feature: Reflect the change
of extended capabilities.
* test/features/402_get_data_static.feature: Ditto.
* test/features/002_get_data_static.feature: Ditto.
* test/features/003_keyattr_change.feature: New test.
* src/usb_lld.h: Don't use 'extern' for function declarations.
* src/usb-icc.c (end_cmd_apdu_data): Fix Le handling.

View File

@@ -8,7 +8,7 @@ Feature: command GET DATA
Scenario: data object extended capabilities
When requesting extended capabilities: c0
Then data should match: \x70\x00\x00\x20[\x00\x08]\x00\x00\xff\x01\x00
Then data should match: [\x70\x74]\x00\x00\x20[\x00\x08]\x00\x00\xff\x01\x00
Scenario: data object algorithm attributes 1
When requesting algorithm attributes 1: c1

View File

@@ -0,0 +1,28 @@
@keyattr
Feature: key attribute change
In order to use a token with multiple different kind of key algorighm
A token should support key attribute change
Scenario: key attribute data object write: algorithm for signature (RSA-4K)
Given cmd_put_data with c1 and "\x01\x10\x00\x00\x20\x00"
Then it should get success
Scenario: key attribute data object write: algorithm for signature (RSA-2K)
Given cmd_put_data with c1 and "\x01\x08\x00\x00\x20\x00"
Then it should get success
Scenario: key attribute data object write: algorithm for decryption (RSA-4K)
Given cmd_put_data with c2 and "\x01\x10\x00\x00\x20\x00"
Then it should get success
Scenario: key attribute data object write: algorithm for decryption (RSA-2K)
Given cmd_put_data with c2 and "\x01\x08\x00\x00\x20\x00"
Then it should get success
Scenario: key attribute data object write: algorithm for authentication (RSA-4K)
Given cmd_put_data with c3 and "\x01\x10\x00\x00\x20\x00"
Then it should get success
Scenario: key attribute data object write: algorithm for authentication (RSA-2K)
Given cmd_put_data with c3 and "\x01\x08\x00\x00\x20\x00"
Then it should get success

View File

@@ -8,7 +8,7 @@ Feature: command GET DATA
Scenario: data object extended capabilities
When requesting extended capabilities: c0
Then data should match: \x70\x00\x00\x20[\x00\x08]\x00\x00\xff\x01\x00
Then data should match: [\x70\x74]\x00\x00\x20[\x00\x08]\x00\x00\xff\x01\x00
Scenario: data object algorithm attributes 1
When requesting algorithm attributes 1: c1

View File

@@ -8,7 +8,7 @@ Feature: command GET DATA
Scenario: data object extended capabilities
When requesting extended capabilities: c0
Then data should match: \x70\x00\x00\x20[\x00\x08]\x00\x00\xff\x01\x00
Then data should match: [\x70\x74]\x00\x00\x20[\x00\x08]\x00\x00\xff\x01\x00
Scenario: data object algorithm attributes 1
When requesting algorithm attributes 1: c1