Skip to content
This repository has been archived by the owner on Aug 2, 2024. It is now read-only.

Commit

Permalink
Remove ability to set a custom TrustManager as it needs a newer Gin…
Browse files Browse the repository at this point in the history
…i API SDK version

PIA-2674
  • Loading branch information
a-szotyori committed Jun 7, 2022
1 parent b80f11a commit 110ce90
Showing 1 changed file with 0 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@
import androidx.annotation.Nullable;
import androidx.annotation.XmlRes;

import javax.net.ssl.TrustManager;

import bolts.Continuation;
import bolts.Task;

Expand Down Expand Up @@ -349,7 +347,6 @@ public static class Builder {
private int mMaxNumberOfRetries;
private float mBackoffMultiplier;
private DocumentMetadata mDocumentMetadata;
private TrustManager mTrustManager;

Builder(@NonNull final Context context) {
mContext = context;
Expand Down Expand Up @@ -394,9 +391,6 @@ public GiniVisionDefaultNetworkService build() {
if (mBackoffMultiplier >= 0) {
sdkBuilder.setConnectionBackOffMultiplier(mBackoffMultiplier);
}
if (mTrustManager != null) {
sdkBuilder.setTrustManager(mTrustManager);
}
final Gini giniApi = sdkBuilder.build();
return new GiniVisionDefaultNetworkService(giniApi, mDocumentMetadata);
}
Expand Down Expand Up @@ -569,20 +563,6 @@ public Builder setDocumentMetadata(@NonNull final DocumentMetadata documentMetad
return this;
}

/**
* Set a custom {@link TrustManager} implementation to have full control over which certificates to trust.
* <p>
* Please be aware that if you set a custom TrustManager implementation here than it will override any
* <a href="https://developer.android.com/training/articles/security-config">network security configuration</a>
* you may have set.
*
* @param trustManager A {@link TrustManager} implementation.
* @return the {@link Builder} instance
*/
public Builder setTrustManager(@NonNull final TrustManager trustManager) {
mTrustManager = trustManager;
return this;
}
}

}

0 comments on commit 110ce90

Please sign in to comment.