Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong public key not blocking the API request. #105

Open
MahaleTushar opened this issue May 18, 2023 · 0 comments
Open

Wrong public key not blocking the API request. #105

MahaleTushar opened this issue May 18, 2023 · 0 comments

Comments

@MahaleTushar
Copy link

MahaleTushar commented May 18, 2023

Describe the bug
I have added the wrong public key in network_security_config file, still the API request is working fine.
I am using Volley for network request.

`
HurlStack sslHurlStack = new HurlStack() {
@OverRide
protected HttpURLConnection createConnection(URL url) throws IOException {

                    HttpsURLConnection httpURLConnection = (HttpsURLConnection) super.createConnection(url);
                    try {
                        httpURLConnection.setSSLSocketFactory(TrustKit.getInstance().getSSLSocketFactory(url.getHost()));
                    } catch (Exception e) {
                    }
                    return httpURLConnection;
                }
            };
            
                RequestQueue mRequestQueue  = Volley.newRequestQueue(context, sslHurlStack);

            `

Expected behavior
The API request should fail when the Public key added in network_security_config is incorrect

App details:

  • App target SDK: 32
  • App language: Java
  • Android version to reproduce the bug :12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant