summaryrefslogtreecommitdiff
path: root/smcc/src/test/java
diff options
context:
space:
mode:
authorBonato, Martin <martin.bonato@prime-sign.com>2018-02-08 22:19:55 +0100
committerBonato, Martin <martin.bonato@prime-sign.com>2018-02-08 22:19:55 +0100
commitb9ccb62d35a755efb505d426ce924d5a8fbe937a (patch)
tree00d17aa7dc660eb0e90ae753e36a623d672fc0e0 /smcc/src/test/java
parent84794c877062fe0424f357be0e83bdd045d75d52 (diff)
downloadmocca-b9ccb62d35a755efb505d426ce924d5a8fbe937a.tar.gz
mocca-b9ccb62d35a755efb505d426ce924d5a8fbe937a.tar.bz2
mocca-b9ccb62d35a755efb505d426ce924d5a8fbe937a.zip
BulkSignature implementationfb-bulksignature
Diffstat (limited to 'smcc/src/test/java')
-rw-r--r--smcc/src/test/java/at/gv/egiz/smcc/card/CreateSignature.java3
-rw-r--r--smcc/src/test/java/at/gv/egiz/smcc/pin/gui/CancelPINProvider.java3
-rw-r--r--smcc/src/test/java/at/gv/egiz/smcc/pin/gui/InterruptPINProvider.java3
-rw-r--r--smcc/src/test/java/at/gv/egiz/smcc/pin/gui/InvalidPINProvider.java3
-rw-r--r--smcc/src/test/java/at/gv/egiz/smcc/pin/gui/SMCCTestPINProvider.java3
-rw-r--r--smcc/src/test/java/at/gv/egiz/smcc/test/AbstractCardTest.java5
-rw-r--r--smcc/src/test/java/at/gv/egiz/smcc/test/ecard/ECardG3InfoboxContainerTest.java3
7 files changed, 15 insertions, 8 deletions
diff --git a/smcc/src/test/java/at/gv/egiz/smcc/card/CreateSignature.java b/smcc/src/test/java/at/gv/egiz/smcc/card/CreateSignature.java
index 5acc7e10..a2204bb7 100644
--- a/smcc/src/test/java/at/gv/egiz/smcc/card/CreateSignature.java
+++ b/smcc/src/test/java/at/gv/egiz/smcc/card/CreateSignature.java
@@ -35,6 +35,7 @@ import java.nio.charset.Charset;
import java.util.Formatter;
import java.util.Locale;
+import at.gv.egiz.smcc.BulkSignException;
import at.gv.egiz.smcc.CancelledException;
import at.gv.egiz.smcc.PinInfo;
import at.gv.egiz.smcc.SignatureCard;
@@ -96,7 +97,7 @@ public class CreateSignature {
@Override
public char[] providePIN(PinInfo pinSpec, int retries)
- throws CancelledException, InterruptedException {
+ throws CancelledException, InterruptedException, BulkSignException {
System.out.print("Enter " + pinSpec.getLocalizedName() + ": ");
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
String pin;
diff --git a/smcc/src/test/java/at/gv/egiz/smcc/pin/gui/CancelPINProvider.java b/smcc/src/test/java/at/gv/egiz/smcc/pin/gui/CancelPINProvider.java
index 281ef7b2..35dbafa8 100644
--- a/smcc/src/test/java/at/gv/egiz/smcc/pin/gui/CancelPINProvider.java
+++ b/smcc/src/test/java/at/gv/egiz/smcc/pin/gui/CancelPINProvider.java
@@ -24,6 +24,7 @@
package at.gv.egiz.smcc.pin.gui;
+import at.gv.egiz.smcc.BulkSignException;
import at.gv.egiz.smcc.CancelledException;
import at.gv.egiz.smcc.PinInfo;
@@ -31,7 +32,7 @@ public class CancelPINProvider extends DummyPINGUI implements PINGUI {
@Override
public char[] providePIN(PinInfo spec, int retries)
- throws CancelledException, InterruptedException {
+ throws CancelledException, InterruptedException, BulkSignException {
throw new CancelledException("cancelled by cancelPINProvider");
}
} \ No newline at end of file
diff --git a/smcc/src/test/java/at/gv/egiz/smcc/pin/gui/InterruptPINProvider.java b/smcc/src/test/java/at/gv/egiz/smcc/pin/gui/InterruptPINProvider.java
index 184cabc5..9eaa2945 100644
--- a/smcc/src/test/java/at/gv/egiz/smcc/pin/gui/InterruptPINProvider.java
+++ b/smcc/src/test/java/at/gv/egiz/smcc/pin/gui/InterruptPINProvider.java
@@ -24,6 +24,7 @@
package at.gv.egiz.smcc.pin.gui;
+import at.gv.egiz.smcc.BulkSignException;
import at.gv.egiz.smcc.CancelledException;
import at.gv.egiz.smcc.PinInfo;
@@ -34,7 +35,7 @@ public class InterruptPINProvider extends DummyPINGUI implements PINGUI {
@Override
public char[] providePIN(PinInfo spec, int retries)
- throws CancelledException, InterruptedException {
+ throws CancelledException, InterruptedException, BulkSignException {
throw new InterruptedException("interrupted by cancelPINProvider");
}
diff --git a/smcc/src/test/java/at/gv/egiz/smcc/pin/gui/InvalidPINProvider.java b/smcc/src/test/java/at/gv/egiz/smcc/pin/gui/InvalidPINProvider.java
index 22f155de..ab2f646b 100644
--- a/smcc/src/test/java/at/gv/egiz/smcc/pin/gui/InvalidPINProvider.java
+++ b/smcc/src/test/java/at/gv/egiz/smcc/pin/gui/InvalidPINProvider.java
@@ -24,6 +24,7 @@
package at.gv.egiz.smcc.pin.gui;
+import at.gv.egiz.smcc.BulkSignException;
import at.gv.egiz.smcc.CancelledException;
import at.gv.egiz.smcc.PinInfo;
@@ -41,7 +42,7 @@ public class InvalidPINProvider extends DummyPINGUI implements PINGUI {
@Override
public char[] providePIN(PinInfo spec, int retries)
- throws CancelledException, InterruptedException {
+ throws CancelledException, InterruptedException, BulkSignException {
if (provided >= numWrongTries) {
throw new CancelledException("Number of wrong tries reached: " + provided);
} else {
diff --git a/smcc/src/test/java/at/gv/egiz/smcc/pin/gui/SMCCTestPINProvider.java b/smcc/src/test/java/at/gv/egiz/smcc/pin/gui/SMCCTestPINProvider.java
index 05bbc9df..05e18d90 100644
--- a/smcc/src/test/java/at/gv/egiz/smcc/pin/gui/SMCCTestPINProvider.java
+++ b/smcc/src/test/java/at/gv/egiz/smcc/pin/gui/SMCCTestPINProvider.java
@@ -24,6 +24,7 @@
package at.gv.egiz.smcc.pin.gui;
+import at.gv.egiz.smcc.BulkSignException;
import at.gv.egiz.smcc.CancelledException;
import at.gv.egiz.smcc.PinInfo;
@@ -38,7 +39,7 @@ public class SMCCTestPINProvider extends DummyPINGUI implements PINGUI {
@Override
public char[] providePIN(PinInfo spec, int retries)
- throws CancelledException, InterruptedException {
+ throws CancelledException, InterruptedException, BulkSignException {
provided++;
return pin;
}
diff --git a/smcc/src/test/java/at/gv/egiz/smcc/test/AbstractCardTest.java b/smcc/src/test/java/at/gv/egiz/smcc/test/AbstractCardTest.java
index f6faafe6..5012f34d 100644
--- a/smcc/src/test/java/at/gv/egiz/smcc/test/AbstractCardTest.java
+++ b/smcc/src/test/java/at/gv/egiz/smcc/test/AbstractCardTest.java
@@ -36,6 +36,7 @@ import java.security.NoSuchAlgorithmException;
import org.junit.Test;
+import at.gv.egiz.smcc.BulkSignException;
import at.gv.egiz.smcc.CancelledException;
import at.gv.egiz.smcc.CardNotSupportedException;
import at.gv.egiz.smcc.LockedException;
@@ -176,7 +177,7 @@ public abstract class AbstractCardTest extends AbstractCardTestBase {
PINGUI pinProvider = new DummyPINGUI() {
@Override
public char[] providePIN(PinInfo spec, int retries)
- throws CancelledException, InterruptedException {
+ throws CancelledException, InterruptedException, BulkSignException {
try {
signatureCard.getCertificate(KeyboxName.SECURE_SIGNATURE_KEYPAIR, null);
@@ -201,7 +202,7 @@ public abstract class AbstractCardTest extends AbstractCardTestBase {
PINGUI pinProvider = new DummyPINGUI() {
@Override
public char[] providePIN(PinInfo spec, int retries)
- throws CancelledException, InterruptedException {
+ throws CancelledException, InterruptedException, BulkSignException {
try {
signatureCard.getCertificate(KeyboxName.CERTIFIED_KEYPAIR, null);
diff --git a/smcc/src/test/java/at/gv/egiz/smcc/test/ecard/ECardG3InfoboxContainerTest.java b/smcc/src/test/java/at/gv/egiz/smcc/test/ecard/ECardG3InfoboxContainerTest.java
index 9351fa21..a625168e 100644
--- a/smcc/src/test/java/at/gv/egiz/smcc/test/ecard/ECardG3InfoboxContainerTest.java
+++ b/smcc/src/test/java/at/gv/egiz/smcc/test/ecard/ECardG3InfoboxContainerTest.java
@@ -29,6 +29,7 @@ import static org.junit.Assert.*;
import org.junit.Test;
+import at.gv.egiz.smcc.BulkSignException;
import at.gv.egiz.smcc.CancelledException;
import at.gv.egiz.smcc.PinInfo;
import at.gv.egiz.smcc.SignatureCardException;
@@ -44,7 +45,7 @@ public class ECardG3InfoboxContainerTest extends AbstractCardTestBase {
PINGUI pinProvider = new DummyPINGUI() {
@Override
public char[] providePIN(PinInfo pinSpec, int retries)
- throws CancelledException, InterruptedException {
+ throws CancelledException, InterruptedException, BulkSignException {
// must not require a PIN!
fail();
return null;