diff options
| author | J08nY | 2018-02-03 14:34:25 +0100 |
|---|---|---|
| committer | J08nY | 2018-02-03 14:34:25 +0100 |
| commit | d940ed695fc36d2782d27c50e398fc185cf6fed3 (patch) | |
| tree | 53e8e1a2ea9692d865db2865083c37876357464d /src/cz/crcs/ectester/reader | |
| parent | cb6c6b8b1274fe5a340c4317a4b015ea0ef15396 (diff) | |
| download | ECTester-d940ed695fc36d2782d27c50e398fc185cf6fed3.tar.gz ECTester-d940ed695fc36d2782d27c50e398fc185cf6fed3.tar.zst ECTester-d940ed695fc36d2782d27c50e398fc185cf6fed3.zip | |
Fix default test suite F2M domain setting.
Diffstat (limited to 'src/cz/crcs/ectester/reader')
| -rw-r--r-- | src/cz/crcs/ectester/reader/test/CardDefaultSuite.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/cz/crcs/ectester/reader/test/CardDefaultSuite.java b/src/cz/crcs/ectester/reader/test/CardDefaultSuite.java index c3bd9c8..cb5e0c9 100644 --- a/src/cz/crcs/ectester/reader/test/CardDefaultSuite.java +++ b/src/cz/crcs/ectester/reader/test/CardDefaultSuite.java @@ -37,8 +37,9 @@ public class CardDefaultSuite extends CardTestSuite { private void runDefault(byte field) throws Exception { short[] keySizes = field == KeyPair.ALG_EC_FP ? EC_Consts.FP_SIZES : EC_Consts.F2M_SIZES; + short domain = field == KeyPair.ALG_EC_FP ? EC_Consts.PARAMETERS_DOMAIN_FP : EC_Consts.PARAMETERS_DOMAIN_F2M; for (short keyLength : keySizes) { - String description = "Tests of " + keyLength + "b " + (field == KeyPair.ALG_EC_FP ? "ALG_EC_FP" : "ALG_EC_F2M") + " support."; + String description = "Tests of " + keyLength + "b " + CardUtil.getKeyTypeString(field) + " support."; List<Test> supportTests = new LinkedList<>(); Test key = runTest(CommandTest.expect(new Command.Allocate(this.card, ECTesterApplet.KEYPAIR_BOTH, keyLength, field), ExpectedValue.SUCCESS)); @@ -49,7 +50,7 @@ public class CardDefaultSuite extends CardTestSuite { supportTests.add(key); Test genDefault = runTest(CommandTest.expect(new Command.Generate(this.card, ECTesterApplet.KEYPAIR_BOTH), ExpectedValue.SUCCESS)); - Test setCustom = runTest(CommandTest.expect(new Command.Set(this.card, ECTesterApplet.KEYPAIR_BOTH, EC_Consts.getCurve(keyLength, field), EC_Consts.PARAMETERS_DOMAIN_FP, null), ExpectedValue.SUCCESS)); + Test setCustom = runTest(CommandTest.expect(new Command.Set(this.card, ECTesterApplet.KEYPAIR_BOTH, EC_Consts.getCurve(keyLength, field), domain, null), ExpectedValue.SUCCESS)); Test genCustom = runTest(CommandTest.expect(new Command.Generate(this.card, ECTesterApplet.KEYPAIR_BOTH), ExpectedValue.SUCCESS)); supportTests.add(genDefault); supportTests.add(setCustom); |
