-
Notifications
You must be signed in to change notification settings - Fork 32
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
scmail uses java.awt classes not available in Android #7
Comments
but it didn't work for me. if someone can try it i would appreciate for explanation |
Thanks for this report, I've not used the scmail functionality in anger (which is why it's marked as alpha on the project page) and I'm relying on feedback from users to judge stability. Uses of java.awt classes are restricted to just the single class Unfortunately the use of this class appears to be made necessary because several classes implement The stackoverflow answer you reference above seems to give one line of attack, basically using the http://code.google.com/p/javamail-android project to use custom javamail & activation libs that don't reference the I don't have much time to look at this right now, but would love to hear of any progress you make. |
what about this link , i meet the same problem as you. i am trying to solve it . https://code.google.com/p/androidmagnus/source/browse/trunk/Magnus/src/java/awt/datatransfer/DataFlavor.java?r=3 |
Due to the problems with unavailable classes, support for bc-mail has been dropped completely as of v1.50. Pull requests are welcome tho- make sure you use the new Spongy Castle repo- same place the old one was: https://github.com/rtyley/spongycastle |
Hi,
I'm trying to use scmail lib for smime signing/encryption. I'm now stuck with one issue.
When we run the code below:
MimeBodyPart encryptedPart = encrypter.generate(body,new JceCMSContentEncryptorBuilder(CMSAlgorithm.RC2_CBC).setProvider(keyStoreProvider).build());
ByteArrayOutputStream out = new ByteArrayOutputStream();
encryptedPart.writeTo(out);
it fails in encryptedPart.writeTo(out); Here is the trace
11-21 13:30:53.385: E/dalvikvm(10025): Could not find class 'java.awt.datatransfer.DataFlavor[]', referenced from method org.spongycastle.mail.smime.handlers.pkcs7_mime.
11-21 13:30:53.385: W/dalvikvm(10025): VFY: unable to resolve new-array 3218 ([Ljava/awt/datatransfer/DataFlavor;) in Lorg/spongycastle/mail/smime/handlers/pkcs7_mime;
11-21 13:30:53.390: D/dalvikvm(10025): VFY: replacing opcode 0x23 at 0x000e
11-21 13:30:53.400: W/dalvikvm(10025): VFY: unable to find class referenced in signature ([Ljava/awt/datatransfer/DataFlavor;)
11-21 13:30:53.400: W/dalvikvm(10025): VFY: Ljava/lang/Object; is not instance of [Ljava/lang/Object;
11-21 13:30:53.405: W/dalvikvm(10025): VFY: bad arg 2 (into [Ljava/lang/Object;)
11-21 13:30:53.405: W/dalvikvm(10025): VFY: rejecting call to Lorg/spongycastle/mail/smime/handlers/PKCS7ContentHandler;. (Ljavax/activation/ActivationDataFlavor;[Ljava/awt/datatransfer/DataFlavor;)V
11-21 13:30:53.405: W/dalvikvm(10025): VFY: rejecting opcode 0x70 at 0x0004
11-21 13:30:53.410: W/dalvikvm(10025): VFY: rejected Lorg/spongycastle/mail/smime/handlers/pkcs7_mime;. ()V
11-21 13:30:53.410: W/dalvikvm(10025): Verifier rejected class Lorg/spongycastle/mail/smime/handlers/pkcs7_mime;
11-21 13:30:53.415: W/dalvikvm(10025): Class init failed in newInstance call (Lorg/spongycastle/mail/smime/handlers/pkcs7_mime;)
As i understand BC uses java.awt classes which do not exist on Android
The text was updated successfully, but these errors were encountered: