Merge "Account for null client certificate"

This commit is contained in:
TreeHugger Robot
2017-01-27 20:46:15 +00:00
committed by Android (Google) Code Review

View File

@@ -752,8 +752,11 @@ public class WifiEnterpriseConfig implements Parcelable {
* @throws IllegalArgumentException for an invalid key or certificate.
*/
public void setClientKeyEntry(PrivateKey privateKey, X509Certificate clientCertificate) {
setClientKeyEntryWithCertificateChain(privateKey,
new X509Certificate[] {clientCertificate});
X509Certificate[] clientCertificates = null;
if (clientCertificate != null) {
clientCertificates = new X509Certificate[] {clientCertificate};
}
setClientKeyEntryWithCertificateChain(privateKey, clientCertificates);
}
/**