Skip to content

Wrong public key not blocking the API request. #105

Open
@MahaleTushar

Description

@MahaleTushar

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions