-
Notifications
You must be signed in to change notification settings - Fork 140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
makes the mail module working in android #20
base: spongy-master
Are you sure you want to change the base?
Conversation
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 The '--info' flag hopefully will stop travis builds from dying from the no-output-in-10-minutes problem, but weirdly is also the only thing that makes spongycastle tests pass... https://twitter.com/rtyley/status/425373078084784128 https://travis-ci.org/rtyley/spongycastle/builds/17299026 Also use container-based infrastructure: http://docs.travis-ci.com/user/workers/container-based-infrastructure/
These are some of the files/dirs (that you wouldn't want to check-in to source-control) that I see after getting the gradle-build going:
On Android, the dependencies make supporting bc-mail very hard. Previously I did an rm -Rf on the 'mail' folder of bc, but actually, just removing the include from settings is way more Git-friendly for rebasing.
Version: heads/spongy-scripts-0-gd79423a-dirty https://github.com/rtyley/spongycastle/tree/spongy-scripts
I think "BC" here is a KeyStore format, not a provider. Would be nice to not have to make this correction, but without code changes, I think it wouldn't be easy to write a distingushing ssed expression.
The error was for the `org.bouncycastle.jce.provider.JCERSAPublicKey` class: ``` junit.framework.AssertionFailedError: Serialisation: Exception: java.lang.ClassNotFoundException: org.bouncycastle.jce.provider.JCERSAPublicKey at junit.framework.Assert.fail(Assert.java:57) at junit.framework.TestCase.fail(TestCase.java:227) at org.spongycastle.jce.provider.test.AllTests$SimpleTestTest.testJCE(AllTests.java:46) ```
http://yennicktrevels.com/blog/2013/10/11/automated-gradle-project-deployment-to-sonatype-oss-repository/ Using a 'spongycastle' subgroup (ie com.madgag.spongycastle) to give a useful grouping, apparently this is legit: https://docs.sonatype.org/display/Repository/Choosing+your+Coordinates Also guard against missing gradle.properties for travis, which doesn't have to do signing or uploading to sonatype.
This is usually a version number quite similar to the BouncyCastle version.
e50dfe7
to
0c1600c
Compare
The normal build process for jars and the aar for the mail package seem to work fine but the extended one which executes the tests fails. I think it is only a problem with travis or the test cases (I'm new to travis so may I'm missing something). I tested the mail package manually and it seems like everything works fine. It also works if you include the aar library file (android counterpart for jar) into an app. Does someone know what can cause the failing build or do you see any problems when using the jar/aar with your projects? |
5203233
to
b899f49
Compare
6d18389
to
8c28ad7
Compare
fd0bdd0
to
1cd9c08
Compare
cb3d040
to
f2ed42a
Compare
I managed to get the mail module (smime) working in android. This fixes rtyley/spongycastle-old#7.
You can see what needs to be done to create a working spongycastle package from the bouncycastle source after running the become-spongy.sh script on the mail package: spongycastle/mail/mkspongymail.README
Here is an example how to use the module: https://github.com/Skywalker-11/SpongyCastleMailTestApp