The alias is provided when we use the Keychain createInstallIntent API to store the p12 in the Android KeyStore.
As you correctly noted in your earlier post, we can't retrieve the Private Key in that case.
The only other method I found to load a p12 certificate in Keystore was the load method. But, it doesn't take any alias as parameter.
How do I pass the alias while loading the certificate in the keystore?
On Monday, February 24, 2014 7:53:29 PM UTC-8, Nikolay Elenkov wrote:
On Tue, Feb 25, 2014 at 12:30 PM, Pradeep Phatak
<pradeep...@gmail.com> wrote:
> Thank you Nikolay.
> I added p12 file to the Keystore using the load method, passing the
> InputStream and password string.
> I didn't see any method to provide an alias for this entry.
> KeyStore getCertificate and getKey method require an alias to be passed.
> Without an alias, it is not clear how to get the certificate and key from
> the p12 file.
Presumably you know the alias, since you put it there?
If not use the Enumeration<String> aliases () method to list,
than pick the one you need.
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
---
You received this message because you are subscribed to the Google Groups "Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
No comments:
Post a Comment