Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

added in Apache HTTPClient hostname verifier as our default

  • Loading branch information
n8fr8 committed Aug 3, 2014
1 parent 39fe9d8 commit 3f150daded7461255b9d51bfc59ff91f8a77ed81
Showing with 6 additions and 0 deletions.
  1. +6 −0 src/info/guardianproject/otr/app/im/plugin/xmpp/XmppConnection.java
@@ -126,6 +126,7 @@
import android.os.AsyncTask;
import android.os.RemoteException;
import android.util.Log;
import ch.boye.httpclientandroidlib.conn.ssl.StrictHostnameVerifier;
import de.duenndns.ssl.MemorizingTrustManager;

public class XmppConnection extends ImConnection implements CallbackHandler {
@@ -980,6 +981,8 @@ private void initConnectionAndLogin (Imps.ProviderSettings.QueryMap providerSett
//disable compression based on statement by Ge0rg
mConfig.setCompressionEnabled(false);

mConfig.setHostnameVerifier(new StrictHostnameVerifier() );

mConnection.login(mUsername, mPassword, mResource);

mStreamHandler.notifyInitialLogin();
@@ -993,6 +996,7 @@ private void initConnectionAndLogin (Imps.ProviderSettings.QueryMap providerSett
getContactListManager().listenToRoster(mRoster);

}


// Runs in executor thread
private void initConnection(Imps.ProviderSettings.QueryMap providerSettings, String userName) throws NoSuchAlgorithmException, KeyManagementException, XMPPException {
@@ -1168,6 +1172,8 @@ else if (mIsGoogleAuth)
mConfig.setNotMatchingDomainCheckEnabled(false);
mConfig.setSelfSignedCertificateEnabled(true);
}

// mConfig.setHostnameVerifier();

if (mIsGoogleAuth)
{

0 comments on commit 3f150da

Please sign in to comment.
You can’t perform that action at this time.