Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit eaf9eebb authored by Jan Nordqvist's avatar Jan Nordqvist Committed by Android (Google) Code Review
Browse files

Merge "Fixed binding issue. Updating cert and key for EAP-TLS during...

Merge "Fixed binding issue. Updating cert and key for EAP-TLS during remediation. Fixed WNM remediation logic."
parents 52c62393 620c9205
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)

LOCAL_PROGUARD_ENABLED := disabled
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res

LOCAL_MODULE_TAGS := optional
+5 −5
Original line number Diff line number Diff line
@@ -46,7 +46,7 @@
        </activity>
        <activity android:name="com.android.hotspot2.osu.OSUWebView">
        </activity>
	<service android:name=".app.OSUService">
        <service android:name=".app.OSUService" android:directBootAware="true">
        </service>
        <service android:name=".flow.FlowService" android:process=":osuflow">
        </service>
+7 −0
Original line number Diff line number Diff line
@@ -365,6 +365,13 @@ public class PlatformAdapter {
                altSP = homeSP;
            }
            updateNetwork(altSP, caCert, clientCerts, privateKey);

            if (privateKey != null) {
                X509Certificate cltCert = getCert(certs, OSUCertType.Client);
                mKeyStore.setKeyEntry(CERT_CLT_KEY_ALIAS + homeSP.getFQDN(),
                        privateKey, null, new X509Certificate[]{cltCert});
                mKeyStore.setCertificateEntry(CERT_CLT_CERT_ALIAS + homeSP.getFQDN(), cltCert);
            }
        }

        Intent intent = new Intent(OSUService.REMEDIATION_DONE_ACTION);
+11 −7
Original line number Diff line number Diff line
@@ -135,13 +135,17 @@ public class RemediationHandler implements AlarmManager.OnAlarmListener {
        WifiManager wifiManager = (WifiManager) mContext.getSystemService(Context.WIFI_SERVICE);
        WifiInfo wifiInfo = wifiManager.getConnectionInfo();
        try {
            if (mActivePasspointConfig != null
                    && update.matches(wifiInfo, mActivePasspointConfig.getHomeSP())) {
                Log.d(OSUManager.TAG, "WNM frame received, remediating now");
            if (mActivePasspointConfig == null) {
                Log.d(OSUManager.TAG, String.format("WNM remediation frame '%s' through %012x " +
                        "received, adding to outstanding remediations", url, bssid));
                mOutstanding.addFirst(new PendingUpdate(bssid, url));
            } else if (update.matches(wifiInfo, mActivePasspointConfig.getHomeSP())) {
                Log.d(OSUManager.TAG, String.format("WNM remediation frame '%s' through %012x " +
                        "received, remediating now", url, bssid));
                update.remediate(wifiManager.getCurrentNetwork());
            } else {
                Log.d(OSUManager.TAG, "WNM frame received, adding to outstanding remediations");
                mOutstanding.addFirst(new PendingUpdate(bssid, url));
                Log.w(OSUManager.TAG, String.format("WNM remediation frame '%s' through %012x " +
                        "does not meet restriction", url, bssid));
            }
        } catch (IOException ioe) {
            Log.w(OSUManager.TAG, "Failed to remediate from WNM: " + ioe);
@@ -497,8 +501,8 @@ public class RemediationHandler implements AlarmManager.OnAlarmListener {
                Log.d(OSUManager.TAG, String.format("Checking applicability of %s to %012x\n",
                        wifiInfo != null ? wifiInfo.getBSSID() : "-", mBssid));
                return wifiInfo != null
                        && Utils.parseMac(wifiInfo.getBSSID()) == mBssid;
                        //&& passesRestriction(activeSP);   // !!! b/28600780
                        && Utils.parseMac(wifiInfo.getBSSID()) == mBssid
                        && passesRestriction(activeSP);   // !!! b/28600780
            } else {
                return passesRestriction(mHomeSP);
            }