From a7af8f11402d76ae99d053195da2c151a391894c Mon Sep 17 00:00:00 2001 From: tzefferer Date: Fri, 29 Oct 2010 08:43:21 +0000 Subject: TZ: Added functionality for DNIe card support git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@810 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4 --- smcc/src/test/java/at/gv/egiz/smcc/card/ReadCertiticate.java | 2 +- smcc/src/test/java/at/gv/egiz/smcc/test/AbstractCardTest.java | 8 ++++---- smcc/src/test/java/at/gv/egiz/smcc/test/AbstractCardTestBase.java | 4 ++-- .../test/java/at/gv/egiz/smcc/test/AbstractInvalidCardTest.java | 4 ++-- .../java/at/gv/egiz/smcc/test/AbstractNotActivatedCardTest.java | 4 ++-- 5 files changed, 11 insertions(+), 11 deletions(-) (limited to 'smcc/src/test/java/at') 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 -- cgit v1.2.3