Re: [android-developers] Questions on creating X509v3Certificate on Android

2012-02-12 Thread Nikolay Elenkov
On Sun, Feb 12, 2012 at 1:31 PM, Qin Ding qindi...@gmail.com wrote:
 I have a need to generate X509v3Certificate on Android device.
 ...
 ...  First the android
 dumps so many ambicuouse classes message and discovered old classes and
 block the code message in the catlog.  All these message are related to the
 bouncycastle.  Then there are a few messages related to my code, generally,
 it does not recognize some methods, and static fields

The Bouncy Castle libs in Android are not part of the public API, and not all
classes are included. Use Spongy Castle to include the full BC provider in your
app and use it to generate certificates, etc. It's exactly the same, only
package names and the provider name have been changed. Details here:

https://github.com/rtyley/spongycastle

-- 
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


[android-developers] Questions on creating X509v3Certificate on Android

2012-02-11 Thread Qin Ding
I have a need to generate X509v3Certificate on Android device.  Since
android supports Bouncycastle, I downloaded the latest BC library (1.46)
and installed onto Android.  I have code already that generates the X509v3
cert. I modified the existing code by explicitly include the BC provider.
 It works only outside Android. The code creates self-signed certificate
that can be viewed via cert standard cert viewer.  When I moved the code
inside the android activity class, it does not work anymore.  First the
android dumps so many ambicuouse classes message and discovered old
classes and block the code message in the catlog.  All these message are
related to the bouncycastle.  Then there are a few messages related to my
code, generally, it does not recognize some methods, and static fields

Since we are supporting our app in Android 2.2 and up, I am testing my code
in android 2.2.  My requirement is to generate a self-signed cert and then
post it via json.  I realized that the android 2.2 has bouncycastle 1.35.
 If anyone has the experience that writes the cert using BC in Android, can
you share your experience in terms of BC version you used and whether your
code works in other android versions.

Thank you very much.

QD

-- 
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