Use proper values for SSL flags; remove obsolete code
Bug: 7013259 Change-Id: I8be865806844d4f7bad6bfe65d08735051de6db8
This commit is contained in:
parent
49f5c000a9
commit
e2cf1c58ed
@ -59,18 +59,6 @@ public class MailTransport implements Transport {
|
||||
|
||||
private final HostAuth mHostAuth;
|
||||
private final Context mContext;
|
||||
private String[] mUserInfoParts;
|
||||
|
||||
/**
|
||||
* One of the {@code Transport.CONNECTION_SECURITY_*} values.
|
||||
*/
|
||||
private int mConnectionSecurity;
|
||||
|
||||
/**
|
||||
* Whether or not to trust all server certificates (i.e. skip host verification) in SSL
|
||||
* handshakes
|
||||
*/
|
||||
private boolean mTrustCertificates;
|
||||
|
||||
private Socket mSocket;
|
||||
private InputStream mIn;
|
||||
@ -106,17 +94,17 @@ public class MailTransport implements Transport {
|
||||
|
||||
@Override
|
||||
public boolean canTrySslSecurity() {
|
||||
return mConnectionSecurity == Transport.CONNECTION_SECURITY_SSL;
|
||||
return (mHostAuth.mFlags & HostAuth.FLAG_SSL) != 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canTryTlsSecurity() {
|
||||
return mConnectionSecurity == Transport.CONNECTION_SECURITY_TLS;
|
||||
return (mHostAuth.mFlags & HostAuth.FLAG_TLS) != 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canTrustAllCertificates() {
|
||||
return mTrustCertificates;
|
||||
return (mHostAuth.mFlags & HostAuth.FLAG_TRUST_ALL) != 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user