add experimental setting to allow untested usb devices

This commit is contained in:
Vincent Breitmoser
2017-11-22 16:04:25 +01:00
parent 71d2d66ee2
commit 0d099116d5
5 changed files with 18 additions and 4 deletions

View File

@@ -143,6 +143,7 @@ public final class Constants {
public static final String EXPERIMENTAL_ENABLE_WORD_CONFIRM = "experimentalEnableWordConfirm";
public static final String EXPERIMENTAL_ENABLE_LINKED_IDENTITIES = "experimentalEnableLinkedIdentities";
public static final String EXPERIMENTAL_ENABLE_KEYBASE = "experimentalEnableKeybase";
public static final String EXPERIMENTAL_USB_ALLOW_UNTESTED = "experimentalUsbAllowUntested";
public static final String EXPERIMENTAL_SMARTPGP_VERIFY_AUTHORITY = "smartpgp_authorities_pref";
public static final String EXPERIMENTAL_SMARTPGP_AUTHORITIES = "smartpgp_authorities";

View File

@@ -1016,10 +1016,9 @@ public class SecurityTokenConnection {
TransportType transportType = mTransport.getTransportType();
SecurityTokenInfo info = SecurityTokenInfo
.create(transportType, tokenType, fingerprints, aid, userId, url, pwInfo[4], pwInfo[6], hasLifeCycleManagement);
return info;
return SecurityTokenInfo
.create(transportType, tokenType, fingerprints, aid, userId, url, pwInfo[4], pwInfo[6],
hasLifeCycleManagement);
}
public static double parseOpenPgpVersion(final byte[] aid) {

View File

@@ -402,6 +402,10 @@ public class Preferences {
return mSharedPreferences.getBoolean(Pref.EXPERIMENTAL_ENABLE_KEYBASE, false);
}
public boolean getExperimentalUsbAllowUntested() {
return mSharedPreferences.getBoolean(Pref.EXPERIMENTAL_USB_ALLOW_UNTESTED, false);
}
public boolean getExperimentalSmartPGPAuthoritiesEnable() {
return mSharedPreferences.getBoolean(Pref.EXPERIMENTAL_SMARTPGP_VERIFY_AUTHORITY, false);
}

View File

@@ -1982,5 +1982,7 @@
</plurals>
<string name="button_locate_nfc">"Where is my NFC reader?"</string>
<string name="label_usb_untested_summary">If enabled, USB Smartcard readers can be used that have not been properly tested.</string>
<string name="label_usb_untested">Allow untested USB Devices</string>
</resources>

View File

@@ -35,6 +35,14 @@
android:persistent="true"
android:title="@string/label_theme" />
<SwitchPreference
android:defaultValue="false"
android:key="experimentalUsbAllowUntested"
android:persistent="true"
android:summary="@string/label_usb_untested_summary"
android:title="@string/label_usb_untested" />
<SwitchPreference
android:defaultValue="false"
android:key="smartpgp_authorities_pref"