Info Call to SSL/TLS API

Description

List of all files shipped in the application.

Recommendation

This entry is informative, no recommendations applicable.

References
Technical details

Method com.digitalticks.trade.CommonCode.g.a() calling method javax.net.ssl.HttpsURLConnection.setHostnameVerifier()


    public static String a(String p6, String p7, String p8)
    {
        String v6_7;
        String v0_1 = new java.net.URL(p6);
        v0_1.openConnection();
        if (!v0_1.getProtocol().toLowerCase().equals("https")) {
            v6_7 = ((java.net.HttpURLConnection) v0_1.openConnection());
        } else {
            ark>com.digitalticks.trade.CommonCode.gark>.a();
            v6_7 = ((javax.net.ssl.HttpsURLConnection) v0_1.openConnection());
            v6_7.setHostnameVerifier(ark>com.digitalticks.trade.CommonCode.gark>.b);
        }
        v6_7.setRequestMethod("POST");
        v6_7.setRequestProperty("Content-Type", p8);
        org.json.JSONObject v8_11 = com.digitalticks.trade.CommonCode.a.R;
        if ((v8_11 == null) || (v8_11.isEmpty())) {
            org.json.JSONObject v8_13 = com.digitalticks.trade.CommonCode.a.Q;
            if ((v8_13 != null) && (!v8_13.isEmpty())) {
                v6_7.setRequestProperty("x-DTX", com.digitalticks.trade.CommonCode.a.Q);
            }
        } else {
            v6_7.setRequestProperty("x-DTX", com.digitalticks.trade.CommonCode.a.R);
            com.digitalticks.trade.CommonCode.a.R = 0;
        }
        org.json.JSONObject v8_17 = com.digitalticks.trade.CommonCode.a.T;
        if ((v8_17 == null) || (v8_17.isEmpty())) {
            org.json.JSONObject v8_19 = com.digitalticks.trade.CommonCode.a.S;
            if ((v8_19 != null) && (!v8_19.isEmpty())) {
                try {
                    if ((p7 == null) || (p7.isEmpty())) {
                        org.json.JSONObject v8_23 = new org.json.JSONObject();
                    } else {
                        v8_23 = new org.json.JSONObject(p7);
                    }
                } catch (Throwable) {
                    org.json.JSONObject v8_26 = new StringBuilder();
                    v8_26.append("Could not parse malformed JSON: \"");
                    v8_26.append(p7);
                    v8_26.append("\"");
                    android.util.Log.e("My App", v8_26.toString());
                }
                v8_23.put("_userid", com.digitalticks.trade.CommonCode.a.S);
                p7 = v8_23.toString();
            }
        } else {
            try {
                if ((p7 == null) || (p7.isEmpty())) {
                    org.json.JSONObject v8_29 = new org.json.JSONObject();
                } else {
                    v8_29 = new org.json.JSONObject(p7);
                }
            } catch (Throwable) {
                v8_26 = new StringBuilder();
            }
            v8_29.put("_userid", com.digitalticks.trade.CommonCode.a.T);
            com.digitalticks.trade.CommonCode.a.T = 0;
            p7 = v8_29.toString();
        }
        org.json.JSONObject v8_34 = new java.io.BufferedWriter(new java.io.OutputStreamWriter(v6_7.getOutputStream()));
        v8_34.write(p7);
        v8_34.flush();
        v8_34.close();
        if (v6_7.getResponseCode() == 401) {
            String v7_3 = new android.content.Intent(c.e.a.a.a.b.b.b(), com.digitalticks.trade.Activities.InternetActivity);
            v7_3.setFlags(335544320);
            v7_3.addFlags(268435456);
            v7_3.addFlags(32768);
            v7_3.putExtra("isSessionExpired", 1);
            c.e.a.a.a.b.b.b().startActivity(v7_3);
        }
        String v7_5 = new java.io.BufferedReader(new java.io.InputStreamReader(v6_7.getInputStream()));
        String v6_4 = new StringBuilder();
        while(true) {
            org.json.JSONObject v8_10 = v7_5.readLine();
            if (v8_10 == null) {
                break;
            }
            v6_4.append(v8_10);
        }
        return v6_4.toString();
    }