If there's a conflict at runtime then you may not need to include the BC classes yourself. Just add BC to your bootclasspath for building. Seems a bit fragile, though, even if it works...
Can you access the needed functionality via the java.security framework? Joe On Aug 27, 3:55 pm, fba <[email protected]> wrote: > Has anyone managed to use Bouncy Castle in one of their apps? I need > to be able to do detailed manipulations of x509 certificates (generate > CSRs, generate key pairs, convert between different certificate > formats, etc.), and BC seems the best way to do that. > > I have tried putting the bcprov library in to my project, and then > just using BC like I normally would. When the app is installed, a > large number of "DexOpt: not verifying"... messages pop up. I suspect > this is because BC is already used in Android. However, when I make > calls to certain methods in certain classes, I get errors like this : > > java.lang.ClassCastException: org.bouncycastle.asn1.DERSequence > > I suspect this is because of ambiguity between the classes that are > included in the OS, and the ones in my project. > > Is there any way to get around this? Maybe tell my program to use the > BC library that is included with it and ignore the one included in the > OS? > > Or, could I get around this by making sure that I am using the same > version that is included in the OS? (Or, in a nutshell, is the > ClassCastException likely to be a problem because the parameters > defined for the same method names don't match?) > > Thanks for any help! -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

