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

Commit cc387817 authored by Takayuki, Ogura's avatar Takayuki, Ogura Committed by Yuuki Habu
Browse files

Handle SSL errors in CaptivePortalLoginActivity

[Current Problem]
When SSL error occures, there is no UI of detailed error.
Then end user cannot see SSL error reason and detailed page.

[Solution]
We added new dialog to show error information,
with SSL reason, the detailed certificate.
End user can confirm it via error page if he/she wants to view.

Bug: 74608260
Author: Yevgen Pronenko <yevgen.pronenko@sonymobile.com>
Author: Shigeki Yokomichi <shigeki.x.yokomichi@sonymobile.com>

Change-Id: If700478930f248f2e53f9b1c9b2b7d4e0551b6d7
parent 2c250e32
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -26,7 +26,8 @@
    <uses-permission android:name="android.permission.NETWORK_BYPASS_PRIVATE_DNS" />

    <application android:label="@string/app_name"
                 android:usesCleartextTraffic="true">
                 android:usesCleartextTraffic="true"
                 android:supportsRtl="true" >
        <activity
            android:name="com.android.captiveportallogin.CaptivePortalLoginActivity"
            android:label="@string/action_bar_label"
+28 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2018 The Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->

<TextView
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/ssl_error_msg"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:textAppearance="?android:attr/textAppearanceSmall"
    android:layout_marginStart="20dip"
    android:layout_marginEnd="20dip"
    android:gravity="center_vertical"
    android:layout_marginBottom="4dip"
    android:layout_marginTop="4dip" />
+86 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2018 The Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->

<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:orientation="vertical" >

    <!-- ssl error type -->
    <TextView
        android:id="@+id/ssl_error_type"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_gravity="start"
        android:text="SSL_UNKNOWN"
        android:layout_marginStart="24dip"
        android:layout_marginEnd="24dip"
        android:layout_marginBottom="0dip"
        android:layout_marginTop="24dip" />

    <!-- Page info: -->
    <TextView
        android:id="@+id/page_info"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="@string/page_info"
        android:textStyle="bold"
        android:layout_marginStart="24dip"
        android:layout_marginEnd="24dip" />

    <!-- Title: -->
    <TextView
        android:id="@+id/title"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:textStyle="bold"
        android:layout_marginStart="24dip"
        android:layout_marginEnd="24dip" />

    <!-- Address: -->
    <TextView
        android:id="@+id/address_header"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="@string/page_info_address"
        android:layout_marginStart="24dip"
        android:layout_marginEnd="24dip" />

    <TextView
        android:id="@+id/address"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginStart="24dip"
        android:layout_marginEnd="24dip" />

    <ScrollView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:paddingStart="4dip"
        android:paddingEnd="4dip" >

        <!-- certificate view: -->
        <LinearLayout
            android:id="@+id/certificate_layout"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginBottom="16dip" >
        </LinearLayout>

    </ScrollView>

</LinearLayout>
+12 −0
Original line number Diff line number Diff line
@@ -9,4 +9,16 @@
    <string name="ssl_error_warning" msgid="6653188881418638872">"Die netwerk waarby jy probeer aansluit, het sekuriteitkwessies."</string>
    <string name="ssl_error_example" msgid="647898534624078900">"Byvoorbeeld, die aanmeldbladsy behoort dalk nie aan die organisasie wat gewys word nie."</string>
    <string name="ssl_error_continue" msgid="6492718244923937110">"Gaan in elk geval deur blaaier voort"</string>
    <string name="ok" msgid="1509280796718850364">"OK"</string>
    <string name="page_info" msgid="4048529256302257195">"Bladsy-inligting"</string>
    <string name="page_info_address" msgid="2222306609532903254">"Adres:"</string>
    <string name="ssl_security_warning_title" msgid="6607795404322797541">"Sekuriteitswaarskuwing"</string>
    <string name="ssl_error_view_certificate" msgid="1472768887529093862">"Bekyk sertifikaat"</string>
    <string name="ssl_error_untrusted" msgid="7754507359360636447">"Hierdie sertifikaat is nie van \'n betroubare owerheid nie."</string>
    <string name="ssl_error_mismatch" msgid="3809794439740523641">"Die naam van die werf kom nie ooreen met die naam op die sertifikaat nie."</string>
    <string name="ssl_error_expired" msgid="5739349389499575559">"Hierdie sertifikaat het verval."</string>
    <string name="ssl_error_not_yet_valid" msgid="8193083327719048247">"Hierdie sertifikaat is nog nie geldig nie."</string>
    <string name="ssl_error_date_invalid" msgid="3705563379257285534">"Hierdie sertifikaat het \'n ongeldige datum."</string>
    <string name="ssl_error_invalid" msgid="9041704741505449967">"Hierdie sertifikaat is ongeldig."</string>
    <string name="ssl_error_unknown" msgid="5679243486524754571">"Onbekende sertifikaatfout."</string>
</resources>
+12 −0
Original line number Diff line number Diff line
@@ -9,4 +9,16 @@
    <string name="ssl_error_warning" msgid="6653188881418638872">"ለመቀላቀል እየሞከሩ ያሉት አውታረ መረብ የደህንነት ችግሮች አሉበት።"</string>
    <string name="ssl_error_example" msgid="647898534624078900">"ለምሳሌ፣ የመግቢያ ገጹ የሚታየው ድርጅት ላይሆን ይችላል።"</string>
    <string name="ssl_error_continue" msgid="6492718244923937110">"ለማንኛውም በአሳሽ በኩል ይቀጥሉ"</string>
    <string name="ok" msgid="1509280796718850364">"እሺ"</string>
    <string name="page_info" msgid="4048529256302257195">"የገፅ መረጃ"</string>
    <string name="page_info_address" msgid="2222306609532903254">"አድራሻ:"</string>
    <string name="ssl_security_warning_title" msgid="6607795404322797541">"የደህንነት ቅንብሮች"</string>
    <string name="ssl_error_view_certificate" msgid="1472768887529093862">"ምስክሮች ይመልከቱ"</string>
    <string name="ssl_error_untrusted" msgid="7754507359360636447">"ይህ ምስክር ከታማኝ ቦታ አይደለም።"</string>
    <string name="ssl_error_mismatch" msgid="3809794439740523641">"የጣቢያው ስም ከምስክር ወረቀቱ ስም ጋር አይዛመድም።"</string>
    <string name="ssl_error_expired" msgid="5739349389499575559">"ይህ ምስክር ጊዜው አልፏል"</string>
    <string name="ssl_error_not_yet_valid" msgid="8193083327719048247">"ይህ ምስክር ገና ትክክል አይደለም።"</string>
    <string name="ssl_error_date_invalid" msgid="3705563379257285534">"ይህ ምስክር ትክክለኛ ቀን አለው።"</string>
    <string name="ssl_error_invalid" msgid="9041704741505449967">"ይህ ምስክር ትክክል ያልሆነ ነው።"</string>
    <string name="ssl_error_unknown" msgid="5679243486524754571">"ያልታወቀ የምስክር ስህተት።"</string>
</resources>
Loading