Skip to content
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

Open
wants to merge 20 commits into
base: spongy-master
Choose a base branch
from

Conversation

Skywalker-11
Copy link

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

rtyley and others added 12 commits December 29, 2015 20:19
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.
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.
@Skywalker-11
Copy link
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?

@rtyley rtyley force-pushed the spongy-master branch 2 times, most recently from 5203233 to b899f49 Compare August 20, 2016 10:26
@rtyley rtyley force-pushed the spongy-master branch 2 times, most recently from 6d18389 to 8c28ad7 Compare April 17, 2017 20:45
@rtyley rtyley force-pushed the spongy-master branch 3 times, most recently from fd0bdd0 to 1cd9c08 Compare August 28, 2017 16:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

scmail uses java.awt classes not available in Android
2 participants