(Robert Nekic) Have you tried to generate a CSR with BC in your app?
I seem to be able to do a lot of different certificate related things,
but hit the ClassCastException when I try to generate a CSR.

The other route I have looked at is CoDec, but the license listed on
SourceForge doesn't match the license in the code.   I have contacted
the developers who have said they will get back to me, but I am
looking for a mitigation route if the license doesn't pan out how I
would hope.

Does anyone know of any other libraries that would work for
certificate manipulation?   The java.security.cert classes don't have
any obvious way to generate a CSR, so I am not sure that will work.
Also, I don't need to be able to actually generate SSL sessions using
the certificates, since they are fed in to another program that
handles all of that.  I just need to be able to work with the
certificates.

On Aug 31, 7:46 am, Robert Nekic <robertne...@gmail.com> wrote:
> I'm using bcprov-jdk16-145 in my app and it works fine.  I also see
> the DexOpt messages in logcat and I get some build warnings from it
> (Ignoring InnerClasses attribute for an anonymous inner class that
> doesn't come with an associated EnclosingMethod attribute. (This class
> was probably produced by a broken compiler.)
>
> Regardless, it ultimately builds and appears to work properly.  I'm
> using it for some x509 stuff but I haven't encountered any
> ClassCastExceptions.
>
> I'd love to remove it if this stuff is actually available in Android
> somewhere since the jar adds quite a lot of bulk to my app.
>
> On Aug 27, 6:55 pm, fba <chsoftwo...@gmail.com> 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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to