summaryrefslogtreecommitdiff
path: root/smcc/src/test
diff options
context:
space:
mode:
authortzefferer <tzefferer@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2010-10-29 08:43:21 +0000
committertzefferer <tzefferer@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2010-10-29 08:43:21 +0000
commita7af8f11402d76ae99d053195da2c151a391894c (patch)
treeecc8e8f33b67bb1c47c21237f61a5575f3871153 /smcc/src/test
parent8e4775df41fbf41a18d765b1ead4a05e9a73d3f9 (diff)
downloadmocca-a7af8f11402d76ae99d053195da2c151a391894c.tar.gz
mocca-a7af8f11402d76ae99d053195da2c151a391894c.tar.bz2
mocca-a7af8f11402d76ae99d053195da2c151a391894c.zip
TZ: Added functionality for DNIe card support
git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@810 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4
Diffstat (limited to 'smcc/src/test')
-rw-r--r--smcc/src/test/java/at/gv/egiz/smcc/card/ReadCertiticate.java2
-rw-r--r--smcc/src/test/java/at/gv/egiz/smcc/test/AbstractCardTest.java8
-rw-r--r--smcc/src/test/java/at/gv/egiz/smcc/test/AbstractCardTestBase.java4
-rw-r--r--smcc/src/test/java/at/gv/egiz/smcc/test/AbstractInvalidCardTest.java4
-rw-r--r--smcc/src/test/java/at/gv/egiz/smcc/test/AbstractNotActivatedCardTest.java4
5 files changed, 11 insertions, 11 deletions
diff --git a/smcc/src/test/java/at/gv/egiz/smcc/card/ReadCertiticate.java b/smcc/src/test/java/at/gv/egiz/smcc/card/ReadCertiticate.java
index 38a4042a..ae449c9a 100644
--- a/smcc/src/test/java/at/gv/egiz/smcc/card/ReadCertiticate.java
+++ b/smcc/src/test/java/at/gv/egiz/smcc/card/ReadCertiticate.java
@@ -48,7 +48,7 @@ public class ReadCertiticate {
public static X509Certificate readCertificate(SignatureCard signatureCard,
KeyboxName keyboxName) throws SignatureCardException,
InterruptedException, CertificateException {
- byte[] certificate = signatureCard.getCertificate(KeyboxName.SECURE_SIGNATURE_KEYPAIR);
+ byte[] certificate = signatureCard.getCertificate(KeyboxName.SECURE_SIGNATURE_KEYPAIR, null);
CertificateFactory certificateFactory = CertificateFactory.getInstance("X509");
return (X509Certificate) certificateFactory.generateCertificate(new ByteArrayInputStream(certificate));
}
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 ca3efa38..27cadcf8 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
@@ -48,13 +48,13 @@ public abstract class AbstractCardTest extends AbstractCardTestBase {
byte[] certificateSSRef = (byte[]) applicationContext.getBean("certificateSS", byte[].class);
- byte[] certificateSS = signatureCard.getCertificate(KeyboxName.SECURE_SIGNATURE_KEYPAIR);
+ byte[] certificateSS = signatureCard.getCertificate(KeyboxName.SECURE_SIGNATURE_KEYPAIR, null);
assertArrayEquals(certificateSSRef, certificateSS);
byte[] certificateGSRef = (byte[]) applicationContext.getBean("certificateGS", byte[].class);
- byte[] certificateGS = signatureCard.getCertificate(KeyboxName.CERITIFIED_KEYPAIR);
+ byte[] certificateGS = signatureCard.getCertificate(KeyboxName.CERITIFIED_KEYPAIR, null);
assertArrayEquals(certificateGSRef, certificateGS);
@@ -171,7 +171,7 @@ public abstract class AbstractCardTest extends AbstractCardTestBase {
throws CancelledException, InterruptedException {
try {
- signatureCard.getCertificate(KeyboxName.SECURE_SIGNATURE_KEYPAIR);
+ signatureCard.getCertificate(KeyboxName.SECURE_SIGNATURE_KEYPAIR, null);
assertTrue(false);
return null;
} catch (SignatureCardException e) {
@@ -198,7 +198,7 @@ public abstract class AbstractCardTest extends AbstractCardTestBase {
throws CancelledException, InterruptedException {
try {
- signatureCard.getCertificate(KeyboxName.CERITIFIED_KEYPAIR);
+ signatureCard.getCertificate(KeyboxName.CERITIFIED_KEYPAIR, null);
assertTrue(false);
return null;
} catch (SignatureCardException e) {
diff --git a/smcc/src/test/java/at/gv/egiz/smcc/test/AbstractCardTestBase.java b/smcc/src/test/java/at/gv/egiz/smcc/test/AbstractCardTestBase.java
index f809ca71..90105b2b 100644
--- a/smcc/src/test/java/at/gv/egiz/smcc/test/AbstractCardTestBase.java
+++ b/smcc/src/test/java/at/gv/egiz/smcc/test/AbstractCardTestBase.java
@@ -18,7 +18,7 @@
package at.gv.egiz.smcc.test;
import static org.junit.Assert.assertNotNull;
-import iaik.security.provider.IAIK;
+//import iaik.security.provider.IAIK;
import javax.smartcardio.Card;
@@ -44,7 +44,7 @@ public abstract class AbstractCardTestBase {
@BeforeClass
public static void setupClass() {
- IAIK.addAsJDK14Provider();
+// IAIK.addAsJDK14Provider();
}
@Before
diff --git a/smcc/src/test/java/at/gv/egiz/smcc/test/AbstractInvalidCardTest.java b/smcc/src/test/java/at/gv/egiz/smcc/test/AbstractInvalidCardTest.java
index 7b9f9f83..da023f12 100644
--- a/smcc/src/test/java/at/gv/egiz/smcc/test/AbstractInvalidCardTest.java
+++ b/smcc/src/test/java/at/gv/egiz/smcc/test/AbstractInvalidCardTest.java
@@ -33,7 +33,7 @@ public abstract class AbstractInvalidCardTest extends AbstractCardTestBase {
public void testGetCertificates() throws SignatureCardException, InterruptedException {
try {
- signatureCard.getCertificate(KeyboxName.SECURE_SIGNATURE_KEYPAIR);
+ signatureCard.getCertificate(KeyboxName.SECURE_SIGNATURE_KEYPAIR, null);
fail();
} catch (SignatureCardException e) {
// expected
@@ -42,7 +42,7 @@ public abstract class AbstractInvalidCardTest extends AbstractCardTestBase {
}
try {
- signatureCard.getCertificate(KeyboxName.CERITIFIED_KEYPAIR);
+ signatureCard.getCertificate(KeyboxName.CERITIFIED_KEYPAIR, null);
fail();
} catch (SignatureCardException e) {
// expected
diff --git a/smcc/src/test/java/at/gv/egiz/smcc/test/AbstractNotActivatedCardTest.java b/smcc/src/test/java/at/gv/egiz/smcc/test/AbstractNotActivatedCardTest.java
index 9736531f..03115a2b 100644
--- a/smcc/src/test/java/at/gv/egiz/smcc/test/AbstractNotActivatedCardTest.java
+++ b/smcc/src/test/java/at/gv/egiz/smcc/test/AbstractNotActivatedCardTest.java
@@ -39,7 +39,7 @@ public abstract class AbstractNotActivatedCardTest extends AbstractCardTestBase
public void testGetCertificates() throws SignatureCardException, InterruptedException {
try {
- signatureCard.getCertificate(KeyboxName.SECURE_SIGNATURE_KEYPAIR);
+ signatureCard.getCertificate(KeyboxName.SECURE_SIGNATURE_KEYPAIR, null);
fail();
} catch (NotActivatedException e) {
// expected
@@ -48,7 +48,7 @@ public abstract class AbstractNotActivatedCardTest extends AbstractCardTestBase
}
try {
- signatureCard.getCertificate(KeyboxName.CERITIFIED_KEYPAIR);
+ signatureCard.getCertificate(KeyboxName.CERITIFIED_KEYPAIR, null);
fail();
} catch (NotActivatedException e) {
// expected