Add travis-ci, hopefully without spamming the BC folks

Pretty sure BouncyCastle needs OpenJDK to build and run tests

I don't know how to register the unsigned JCE provider on Oracle JDK,
OpenJDK doesn't seem to check.

try to make travis output clearer

http://stackoverflow.com/a/17942820/438886
Format cert-revocation date in GMT to avoid timezone-dependent tests

In my London-based JVM, the date was actually Apr 19th, and the
asserted string in NistCertPathTest did not match.

This is an alternative to this prior pull-request, which just relaxed
the test condition to ignore the date:

https://github.com/bcgit/bc-java/pull/45#issuecomment-31311148
Gradle: Specify version of JUnit to avoid unreproducible builds

Another reason for this change is that it stops Gradle from making
unnecessary trips to the network to verify if it has the latest version
of JUnit. ie, on my laptop, even after many successful builds, it was
still possible to get this error if disconnected from the internet:

--
$ gradle test

FAILURE: Build failed with an exception.

* What went wrong:
Could not resolve all dependencies for configuration ':core:testCompile'.
> Could not resolve junit:junit:4.+.
  Required by:
      spongycastle:core:1.50-b01
   > Failed to list versions for junit:junit:4.+.
      > Could not list versions using M2 pattern 'http://repo1.maven.org/maven2/[organisation]/[module]/[revision]/[artifact]-[revision](-[classifier]).[ext]'.
         > Could not GET 'http://repo1.maven.org/maven2/junit/junit/'.
            > repo1.maven.org
--
Move FileDaFirmare test resources required by PKIX

core:src/test/data/org/bouncycastle/tsp/test/FileDaFirmare.data

used by

pkix:org.bouncycastle.tsp.test.CMSTimeStampedDataGeneratorTest
move the ocsp stuff...
Duff test?
Fix some "no such provider" initialisation errors in tests

Caused by: java.security.NoSuchProviderException: no such provider: BC
	at sun.security.jca.GetInstance.getService(GetInstance.java:83)
	at sun.security.jca.GetInstance.getInstance(GetInstance.java:206)
	at java.security.Signature.getInstance(Signature.java:355)
	at org.bouncycastle.jcajce.NamedJcaJceHelper.createSignature(NamedJcaJceHelper.java:95)
Hopefully fix BcSignedDataTest

BcSignedDataTest. testCounterSigBcSignedDataTest. testEncapsulatedSamplesBcSignedDataTest. testSamples
Hopefully fix org.bouncycastle.eac.test.AllTests
Attempt to fix org.bouncycastle.tsp.test.NewTSPTest

java.security.NoSuchAlgorithmException: MD5WithRSAEncryption Signature not available	at java.security.Signature.getInstance(Signature.java:224)	at org.bouncycastle.x509.X509Util.getSignatureInstance(X509Util.java:190)	at org.bouncycastle.x509.X509Util.calculateSignature(X509Util.java:223)	at org.bouncycastle.x509.X509V3CertificateGenerator.generate(X509V3CertificateGenerator.java:434)	at org.bouncycastle.x509.X509V3CertificateGenerator.generate(X509V3CertificateGenerator.java:412)	at org.bouncycastle.tsp.test.TSPTestUtil.makeCertificate(TSPTestUtil.java:196)	at org.bouncycastle.tsp.test.TSPTestUtil.makeCACertificate(TSPTestUtil.java:155)	at org.bouncycastle.tsp.test.NewTSPTest.testGeneral(NewTSPTest.java:65)
Fix prov RSA3CertTest

org.bouncycastle.jce.provider.test.AllTests > org.bouncycastle.jce.provider.test.rsa3.RSA3CertTest.testI FAILED    org.bouncycastle.jcajce.provider.asymmetric.x509.CertificateFactory$ExCertificateException at RSA3CertTest.java:113        Caused by: java.io.IOException at RSA3CertTest.java:113org.bouncycastle.jce.provider.test.AllTests > org.bouncycastle.jce.provider.test.rsa3.RSA3CertTest.testJ FAILED    org.bouncycastle.jcajce.provider.asymmetric.x509.CertificateFactory$ExCertificateException at RSA3CertTest.java:113        Caused by: java.io.IOException at RSA3CertTest.java:113
why you break?

debug

show me err?
CertPathValidatorTest currently fails with:

    org.bouncycastle.jce.exception.ExtCertPathValidatorException: No CRLs found for issuer "CN=Test CA Certificate"
    	at org.bouncycastle.jce.provider.RFC3280CertPathUtilities.processCertA(RFC3280CertPathUtilities.java:1516)
    	at org.bouncycastle.jce.provider.PKIXCertPathValidatorSpi.engineValidate(PKIXCertPathValidatorSpi.java:274)
    	at java.security.cert.CertPathValidator.validate(CertPathValidator.java:279)
    	at org.bouncycastle.jce.provider.test.CertPathValidatorTest.performTest(CertPathValidatorTest.java:281)
    	at org.bouncycastle.util.test.SimpleTest.perform(SimpleTest.java:49)
    	at org.bouncycastle.jce.provider.test.AllTests.testJCE(AllTests.java:23)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    	at java.lang.reflect.Method.invoke(Method.java:606)
    	at junit.framework.TestCase.runTest(TestCase.java:176)
    	at junit.framework.TestCase.runBare(TestCase.java:141)
    	at junit.framework.TestResult$1.protect(TestResult.java:122)
    	at junit.framework.TestResult.runProtected(TestResult.java:142)
    	at junit.framework.TestResult.run(TestResult.java:125)
    	at junit.framework.TestCase.run(TestCase.java:129)
    	at junit.framework.TestSuite.runTest(TestSuite.java:255)
    	at junit.framework.TestSuite.run(TestSuite.java:250)
    	at junit.framework.TestSuite.runTest(TestSuite.java:255)
    	at junit.framework.TestSuite.run(TestSuite.java:250)
    	at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:84)
    	at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecuter.runTestClass(JUnitTestClassExecuter.java:80)
    	at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecuter.execute(JUnitTestClassExecuter.java:47)
    	at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassProcessor.processTestClass(JUnitTestClassProcessor.java:69)
    	at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.processTestClass(SuiteTestClassProcessor.java:49)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    	at java.lang.reflect.Method.invoke(Method.java:606)
    	at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
    	at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
    	at org.gradle.messaging.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:32)
    	at org.gradle.messaging.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:93)
    	at com.sun.proxy.$Proxy2.processTestClass(Unknown Source)
    	at org.gradle.api.internal.tasks.testing.worker.TestWorker.processTestClass(TestWorker.java:103)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    	at java.lang.reflect.Method.invoke(Method.java:606)
    	at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
    	at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
    	at org.gradle.messaging.remote.internal.hub.MessageHub$Handler.run(MessageHub.java:355)
    	at org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:66)
    	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    	at java.lang.Thread.run(Thread.java:724)
    Caused by: org.bouncycastle.jce.provider.AnnotatedException: No CRLs found for issuer "CN=Test CA Certificate"
    	at org.bouncycastle.jce.provider.CertPathValidatorUtilities.getCompleteCRLs(CertPathValidatorUtilities.java:1224)
    	at org.bouncycastle.jce.provider.RFC3280CertPathUtilities.checkCRL(RFC3280CertPathUtilities.java:1750)
    	at org.bouncycastle.jce.provider.RFC3280CertPathUtilities.checkCRLs(RFC3280CertPathUtilities.java:1986)
    	at org.bouncycastle.jce.provider.RFC3280CertPathUtilities.processCertA(RFC3280CertPathUtilities.java:1506)
    	... 45 more

org.bouncycastle.jce.provider.test.AllTests > testJCE FAILED
    junit.framework.AssertionFailedError: CertPathValidator: Exception: org.bouncycastle.jce.exception.ExtCertPathValidatorException: No CRLs found for issuer "CN=Test CA Certificate"
        at junit.framework.Assert.fail(Assert.java:57)
        at junit.framework.TestCase.fail(TestCase.java:227)
        at org.bouncycastle.jce.provider.test.AllTests.testJCE(AllTests.java:32)
delete mysterious failures

junit.framework.AssertionFailedError: Exception thrown: java.lang.NullPointerException:
null
	at junit.framework.Assert.fail(Assert.java:57)
	at junit.framework.TestCase.fail(TestCase.java:227)
	at org.bouncycastle.pqc.jcajce.provider.test.FlexiTest.fail(FlexiTest.java:64)
	at org.bouncycastle.pqc.jcajce.provider.test.KeyPairGeneratorTest.performKeyPairEncodingTest(KeyPairGeneratorTest.java:43)
	at org.bouncycastle.pqc.jcajce.provider.test.McElieceCCA2KeyPairGeneratorTest.testKeyPairEncoding_9_33(McElieceCCA2KeyPairGeneratorTest.java:34)
Hopefully fix test by installing BC provider

https://travis-ci.org/rtyley/spongycastle/builds/17031595
keystoretest fails on spongy?