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 the Android API. Expectation- In Wifi Settings, this EAP-TLS wifi configuration should show this user certificate pre-selected. Procedure- 1) Used KeyChain API to get the certificate and key by providing the keystore alias. Confirmed that the object references returned were not null. 2) Used WifiEnterpriseConfig setClientKeyEntry API passing the X509certificate and PrivateKey reference. Observation- setClientKeyEntry method throws exception- java.lang.IllegalArgumentException: Private key cannot be encoded. setClientKeyEntry method throws this exception if getEncoded method returns null for the PrivateKey object reference. It is not clear why getEncoded returns null in this case. Can a password protected .p12 file stored in keystore be used for programatically configuring Wifi EAP-TLS using this procedure?
-- 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 --- 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 [email protected]. For more options, visit https://groups.google.com/groups/opt_out.

