Skip to content

Commit

Permalink
TrustAllTrustStrategy implemented. #48.
Browse files Browse the repository at this point in the history
  • Loading branch information
subhash authored and subhash committed Apr 28, 2016
1 parent a80df9b commit 8cf3aea
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
import org.apache.http.conn.ssl.NoopHostnameVerifier;
import org.apache.http.conn.ssl.SSLConnectionSocketFactory;
import org.apache.http.ssl.SSLContextBuilder;
import org.apache.http.conn.ssl.TrustSelfSignedStrategy;
import org.apache.http.conn.ssl.TrustStrategy;
import org.apache.http.entity.AbstractHttpEntity;
import org.apache.http.entity.mime.FormBodyPartBuilder;
Expand All @@ -57,6 +56,7 @@
import org.wiztools.commons.StringUtil;
import org.wiztools.restclient.bean.*;
import org.wiztools.restclient.http.RESTClientCookieStore;
import org.wiztools.restclient.http.TrustAllTrustStrategy;
import org.wiztools.restclient.util.HttpUtil;
import org.wiztools.restclient.util.IDNUtil;
import org.wiztools.restclient.util.Util;
Expand Down Expand Up @@ -391,7 +391,7 @@ else if(part instanceof ReqEntityFilePart) {
sslReq.getKeyStore().getKeyStore();

final TrustStrategy trustStrategy = sslReq.isTrustSelfSignedCert()
? new TrustSelfSignedStrategy(): null;
? new TrustAllTrustStrategy(): null;

SSLContext ctx = new SSLContextBuilder()
.loadKeyMaterial(keyStore, sslReq.getKeyStore()!=null? sslReq.getKeyStore().getPassword(): null)
Expand Down

0 comments on commit 8cf3aea

Please sign in to comment.