Skip to content

Commit 9611a29

Browse files
committed
Fixed SimpleTestTest
1 parent 25cb4c0 commit 9611a29

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

prov/src/test/java/org/bouncycastle/jce/provider/test/agreement/JavaNativeAgreementTest.java

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import junit.framework.TestCase;
44
import org.bouncycastle.crypto.CryptoServicesRegistrar;
55

6+
import org.bouncycastle.crypto.NativeServices;
67
import org.bouncycastle.jcajce.spec.AEADParameterSpec;
78
import org.bouncycastle.jce.provider.BouncyCastleProvider;
89
import org.bouncycastle.util.Arrays;
@@ -50,6 +51,7 @@ public void setUp()
5051
Security.addProvider(new BouncyCastleProvider());
5152
}
5253

54+
5355
}
5456

5557

@@ -62,7 +64,7 @@ public void tearDown()
6264
@Test
6365
public void testGCMJavaAgreement() throws Exception
6466
{
65-
67+
CryptoServicesRegistrar.setNativeEnabled(true);
6668
if (!hasNativeService("AES/GCM"))
6769
{
6870
if (!System.getProperty("test.bclts.ignore.native", "").contains("gcm"))
@@ -183,7 +185,7 @@ public void testGCMJavaAgreement() throws Exception
183185
@Test
184186
public void testCTRJavaAgreement() throws Exception
185187
{
186-
188+
CryptoServicesRegistrar.setNativeEnabled(true);
187189
if (!hasNativeService("AES/CTR"))
188190
{
189191
if (!System.getProperty("test.bclts.ignore.native", "").contains("ctr"))
@@ -296,7 +298,7 @@ public void testCTRJavaAgreement() throws Exception
296298
@Test
297299
public void testCFBJavaAgreement() throws Exception
298300
{
299-
301+
CryptoServicesRegistrar.setNativeEnabled(true);
300302
if (!hasNativeService("AES/CFB"))
301303
{
302304
if (!System.getProperty("test.bclts.ignore.native", "").contains("cfb"))
@@ -411,6 +413,7 @@ public void testCFBJavaAgreement() throws Exception
411413
@Test
412414
public void testCBCJavaAgreement() throws Exception
413415
{
416+
CryptoServicesRegistrar.setNativeEnabled(true);
414417

415418
if (!hasNativeService("AES/CBC"))
416419
{
@@ -528,7 +531,7 @@ public void testCBCJavaAgreement() throws Exception
528531
@Test
529532
public void testECBJavaAgreement() throws Exception
530533
{
531-
534+
CryptoServicesRegistrar.setNativeEnabled(true);
532535
if (!hasNativeService("AES/ECB"))
533536
{
534537
if (!System.getProperty("test.bclts.ignore.native", "").contains("ecb"))
@@ -634,7 +637,7 @@ public void testECBJavaAgreement() throws Exception
634637
@Test
635638
public void testSHA256Agreement() throws Exception
636639
{
637-
640+
CryptoServicesRegistrar.setNativeEnabled(true);
638641
if (!hasNativeService("SHA2"))
639642
{
640643
if (!System.getProperty("test.bclts.ignore.native", "").contains("sha"))

0 commit comments

Comments
 (0)