am b0638de5: am 4b629cf2: Null check certificate alias before trying to configure it

* commit 'b0638de59741703d5beea43cff5f0069a4c1f85d':
  Null check certificate alias before trying to configure it
This commit is contained in:
Tony Mantler 2013-11-15 13:46:11 -08:00 committed by Android Git Automerger
commit be08e43d71
1 changed files with 4 additions and 0 deletions

View File

@ -18,6 +18,7 @@
package com.android.emailcommon.utility;
import android.content.Context;
import android.text.TextUtils;
import com.android.emailcommon.Logging;
import com.android.emailcommon.provider.HostAuth;
@ -90,6 +91,9 @@ public class EmailClientConnectionManager extends ThreadSafeClientConnManager {
*/
public synchronized void registerClientCert(Context context, HostAuth hostAuth)
throws CertificateException {
if (TextUtils.isEmpty(hostAuth.mClientCertAlias)) {
return;
}
SchemeRegistry registry = getSchemeRegistry();
String schemeName = makeSchemeForClientCert(hostAuth.mClientCertAlias,
hostAuth.shouldTrustAllServerCerts());