makes the mail module working in android #20
Open
Skywalker-11 wants to merge 20 commits into
Open
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
Author
|
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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