Null check certificate alias before trying to configure it
Bug: 11678638 Change-Id: Ia12789ac3553ef959a8c9bbf13f017b1a154f560
This commit is contained in:
parent
bc8bc050b0
commit
4b629cf258
@ -18,6 +18,7 @@
|
|||||||
package com.android.emailcommon.utility;
|
package com.android.emailcommon.utility;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
import android.text.TextUtils;
|
||||||
|
|
||||||
import com.android.emailcommon.Logging;
|
import com.android.emailcommon.Logging;
|
||||||
import com.android.emailcommon.provider.HostAuth;
|
import com.android.emailcommon.provider.HostAuth;
|
||||||
@ -90,6 +91,9 @@ public class EmailClientConnectionManager extends ThreadSafeClientConnManager {
|
|||||||
*/
|
*/
|
||||||
public synchronized void registerClientCert(Context context, HostAuth hostAuth)
|
public synchronized void registerClientCert(Context context, HostAuth hostAuth)
|
||||||
throws CertificateException {
|
throws CertificateException {
|
||||||
|
if (TextUtils.isEmpty(hostAuth.mClientCertAlias)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
SchemeRegistry registry = getSchemeRegistry();
|
SchemeRegistry registry = getSchemeRegistry();
|
||||||
String schemeName = makeSchemeForClientCert(hostAuth.mClientCertAlias,
|
String schemeName = makeSchemeForClientCert(hostAuth.mClientCertAlias,
|
||||||
hostAuth.shouldTrustAllServerCerts());
|
hostAuth.shouldTrustAllServerCerts());
|
||||||
|
Loading…
Reference in New Issue
Block a user