Re: [android-developers] WifiEnterpriseConfig setClientKeyEntry doesn't work with .p12 client cert/key in the keystore

2016-06-01 Thread knJoeyn Nguyen
Hello can you show how you were able to retrieve the PrivateKey from the KeyStore? I am getting the same error like the one you mentioned above. Observation- setClientKeyEntry method throws exception- java.lang.IllegalArgumentException: Private key cannot be encoded. setClientKeyEntry method

Re: [android-developers] WifiEnterpriseConfig setClientKeyEntry doesn't work with .p12 client cert/key in the keystore

2014-02-26 Thread Pradeep Phatak
Finally, programatically setting EAP-TLS is working for me. The last error was resolved after I added set phase2auth to none. I believe it was caused by call to getKeyIdForCredentials in WifiConfigStore.java. On Tuesday, February 25, 2014 8:18:46 PM UTC-8, Pradeep Phatak wrote:

Re: [android-developers] WifiEnterpriseConfig setClientKeyEntry doesn't work with .p12 client cert/key in the keystore

2014-02-25 Thread Pradeep Phatak
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.

Re: [android-developers] WifiEnterpriseConfig setClientKeyEntry doesn't work with .p12 client cert/key in the keystore

2014-02-25 Thread Nikolay Elenkov
On Wed, Feb 26, 2014 at 1:18 AM, Pradeep Phatak pradeep.pha...@gmail.com wrote: 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

Re: [android-developers] WifiEnterpriseConfig setClientKeyEntry doesn't work with .p12 client cert/key in the keystore

2014-02-25 Thread Pradeep Phatak
setClientKeyEntry API worked after I retrieved X509Certificate and PrivateKey from the KeyStore. The cert and key looked okay in the WifiConfiguration. Adding wifi network failed with the error below- E/WifiConfigStore(764): 8021x-wpa2-ssid invalid config for key installation

Re: [android-developers] WifiEnterpriseConfig setClientKeyEntry doesn't work with .p12 client cert/key in the keystore

2014-02-24 Thread Pradeep Phatak
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

Re: [android-developers] WifiEnterpriseConfig setClientKeyEntry doesn't work with .p12 client cert/key in the keystore

2014-02-24 Thread Nikolay Elenkov
On Tue, Feb 25, 2014 at 12:30 PM, Pradeep Phatak pradeep.pha...@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

Re: [android-developers] WifiEnterpriseConfig setClientKeyEntry doesn't work with .p12 client cert/key in the keystore

2014-02-23 Thread Nikolay Elenkov
On Sat, Feb 22, 2014 at 9:02 AM, Pradeep Phatak pradeep.pha...@gmail.com wrote: Context- I have stored a password protected .p12 client certificate/key programatically in the Android keystore. During provisioning, Wifi was selected in the dialog (instead of VPN and apps). I want to use it

[android-developers] WifiEnterpriseConfig setClientKeyEntry doesn't work with .p12 client cert/key in the keystore

2014-02-21 Thread Pradeep Phatak
Client device- Nexus 5 Android 4.4.2 Kitkat Context- I have stored a password protected .p12 client certificate/key programatically in the Android keystore. During provisioning, Wifi was selected in the dialog (instead of VPN and apps). I want to use it for Wifi EAP-TLS configuration using