Program fragment that works as expected in J2SE with both BC and SUN
JCE providers:

    public static void main (String arg[]) throws Exception
      {
        KeyStore store = KeyStore.getInstance("PKCS12");
        store.load (new FileInputStream (new File (arg[0])),
arg[1].toCharArray ());
      }


Tested in Android:

dalvikvm -cp app/com.example.android.lunarlander.apk
com.example.android.lunarla
nder.LunarLander android.p12 test
java.io.IOException: exception unwrapping private key -
java.security.NoSuchAlgo
rithmException: SecretKeyFactory 1.2.840.113549.1.12.1.3
implementation not foun
d
        at
org.bouncycastle.jce.provider.JDKPKCS12KeyStore.unwrapKey(JDKPKCS12Ke
yStore.java:582)
        at
org.bouncycastle.jce.provider.JDKPKCS12KeyStore.engineLoad(JDKPKCS12K
eyStore.java:841)
        at java.security.KeyStore.load(KeyStore.java:456)
        at
com.example.android.lunarlander.LunarLander.main(LunarLander.java:241
)
        at dalvik.system.NativeStart.main(Native Method)
#

Sorry for clobbering the LunarLander sample but it is really cool
using command-line sometimes :-)

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

Reply via email to