Account for null client certificate

am: 1ca57a1d10

Change-Id: Id999634bb25a379a5cfdb47412323d2cc6d0cd30
This commit is contained in:
Paul Stewart
2017-01-28 01:45:53 +00:00
committed by android-build-merger

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);
}
/**