Add sshauthentication-api v1 support

This commit is contained in:
Christian Hagau
2017-10-05 00:00:00 +00:00
parent 83ab483fc7
commit 2619cb1db3
57 changed files with 3954 additions and 79 deletions

View File

@@ -72,6 +72,13 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/usage_sign_and_encrypt" />
<RadioButton
android:id="@+id/add_subkey_usage_authentication"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/usage_authentication" />
</RadioGroup>
</TableRow>

View File

@@ -0,0 +1,124 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:layout_marginTop="24dp"
>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="16dp"
android:elevation="4dp"
android:background="?attr/colorPrimary"
android:gravity="center_horizontal"
tools:targetApi="lollipop">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/ic_launcher"
/>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginLeft="24dp"
android:layout_marginRight="24dp"
android:src="@drawable/link_24dp"
/>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/icon_client_app"
tools:src="@drawable/apps_k9"
/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:orientation="vertical">
<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:overScrollMode="ifContentScrolls"
tools:ignore="UselessParent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingLeft="24dp"
android:paddingRight="24dp"
android:paddingTop="24dp"
android:paddingBottom="16dp"
>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:textAppearanceLarge"
android:text="Select authentication key"
android:id="@+id/dialog_title"
/>
<TextView
android:id="@+id/select_identity_key_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:layout_marginBottom="20dp"
android:gravity="center_vertical"
android:textAppearance="?android:attr/textAppearanceSmall"
android:text="These are the keys that could be used for authentication. Please choose from the list:"
/>
<android.support.v7.widget.RecyclerView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/authentication_key_list"
tools:listitem="@layout/authentication_key_item"
tools:layout_height="100dp"
/>
</LinearLayout>
</ScrollView>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="end"
android:padding="8dp"
style="?buttonBarStyle">
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/button_cancel"
android:id="@+id/button_cancel"
style="?buttonBarButtonStyle"
/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Select"
android:id="@+id/button_select"
android:enabled="false"
style="?buttonBarButtonStyle" />
</LinearLayout>
</LinearLayout>

View File

@@ -0,0 +1,44 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="6dp"
android:paddingBottom="6dp"
android:gravity="center_vertical"
android:orientation="horizontal">
<ImageView
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_marginRight="12dp"
android:layout_marginEnd="12dp"
android:id="@+id/key_list_item_icon"
tools:tint="@color/md_grey_600"
tools:src="@drawable/apps_k9"
/>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:id="@+id/key_list_item_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:text="@string/label_main_user_id"
android:textAppearance="?android:attr/textAppearanceMedium" />
<TextView
android:id="@+id/key_list_item_creation"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:maxLines="1"
android:textAppearance="?android:attr/textAppearanceSmall"
tools:visibility="visible"
tools:text="Created on 10/10/2010 10:00" />
</LinearLayout>
</LinearLayout>

View File

@@ -153,6 +153,65 @@
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dip"
android:background="?android:attr/listDivider" />
<LinearLayout
android:id="@+id/share_ssh_layout"
android:layout_width="match_parent"
android:layout_height="?android:attr/listPreferredItemHeight"
android:orientation="horizontal">
<TextView
android:id="@+id/view_key_action_key_ssh_share"
android:paddingLeft="8dp"
android:paddingRight="8dp"
android:textAppearance="?android:attr/textAppearanceMedium"
android:layout_width="0dip"
android:layout_height="match_parent"
android:text="@string/key_view_action_share_ssh_with"
android:layout_weight="1"
android:drawableRight="@drawable/ic_share_grey_24dp"
android:drawablePadding="8dp"
android:gravity="center_vertical"
android:background="?android:selectableItemBackground"/>
<View
android:layout_width="1dip"
android:layout_height="match_parent"
android:gravity="right"
android:layout_marginBottom="8dp"
android:layout_marginTop="8dp"
android:background="?android:attr/listDivider"/>
<ImageButton
android:id="@+id/view_key_action_key_ssh_clipboard"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:padding="8dp"
android:src="@drawable/ic_content_copy_grey_24dp"
android:layout_gravity="center_vertical"
android:background="?android:selectableItemBackground"/>
<View
android:layout_width="1dip"
android:layout_height="match_parent"
android:gravity="right"
android:layout_marginBottom="8dp"
android:layout_marginTop="8dp"
android:background="?android:attr/listDivider"/>
<!-- spacer -->
<View
android:layout_width="40dip"
android:layout_height="match_parent"
android:gravity="right"
android:layout_marginBottom="8dp"
android:layout_marginTop="8dp"/>
</LinearLayout>
<View
android:layout_width="match_parent"

View File

@@ -366,6 +366,7 @@
<string name="no_keys_exported">"No keys exported."</string>
<string name="key_creation_el_gamal_info">"Note: only subkeys support ElGamal."</string>
<string name="key_not_found">"Couldn't find key %08X."</string>
<string name="authentication_subkey_not_found">"This key does not have an authentication subkey."</string>
<plurals name="bad_keys_encountered">"
<item quantity="one">"%d bad secret key ignored. Perhaps you exported with the option\n --export-secret-subkeys\nMake sure you export with\n --export-secret-keys\ninstead.""</item>
@@ -705,6 +706,7 @@
<string name="key_view_action_certify">"Confirm key"</string>
<string name="key_view_action_update">"Update from keyserver"</string>
<string name="key_view_action_share_with">"Share with…"</string>
<string name="key_view_action_share_ssh_with">"Share as SSH public key with…"</string>
<string name="key_view_action_share_nfc">"Share over NFC"</string>
<string name="key_view_action_upload">"Upload to keyserver"</string>
<string name="key_view_tab_main">"Main Info"</string>
@@ -1270,6 +1272,19 @@
<string name="msg_pse">"Starting sign and/or encrypt operation"</string>
<string name="msg_pse_symmetric">"Preparing symmetric encryption"</string>
<!-- Messages for Authentication operation -->
<string name="msg_auth">"Starting authentication operation"</string>
<string name="msg_auth_error_key_auth">"Selected authentication key cannot be found"</string>
<string name="msg_auth_error_key_not_allowed">"Key selected for authentication is not allowed"</string>
<string name="msg_auth_error_revoked_or_expired">"Revoked/Expired key cannot be used for authentication"</string>
<string name="msg_auth_error_unlock">"Unknown error unlocking key!"</string>
<string name="msg_auth_pending_nfc">"NFC token required, requesting user input…"</string>
<string name="msg_auth_pending_passphrase">"Password required, requesting user input…"</string>
<string name="msg_auth_error_bad_passphrase">"Bad password!"</string>
<string name="msg_auth_error_nfc">"NFC data error!"</string>
<string name="msg_auth_error_sig">"Encountered OpenPGP signature exception!"</string>
<string name="msg_auth_ok">"Authentication operation successful!"</string>
<string name="msg_crt_certifying">"Generating certifications"</string>
<plurals name="msg_crt_certify_uids">
<item quantity="one">"Certifying one user ID for key %2$s"</item>
@@ -1847,6 +1862,7 @@
<string name="dialog_insecure_button_undo">Un-Suppress</string>
<string name="dialog_insecure_button_view_key">View Key</string>
<string name="dialog_insecure_button_ok">Got it</string>
<string name="usage_authentication">Authentication</string>
<string name="identity_context_forget">Forget</string>