diff options
author | Arne Schwabe <arne@rfc2549.org> | 2021-10-06 16:25:09 +0200 |
---|---|---|
committer | Arne Schwabe <arne@rfc2549.org> | 2021-10-06 16:58:03 +0200 |
commit | 3166e5229ce512c2424beed9514ab8d76dde2204 (patch) | |
tree | a2c076407fd056e4335964ca65ec1ea9e4873398 /main/src/ui | |
parent | aaab1021aa5c6151dfeb9920fd48ebbc52076363 (diff) |
Add option to allow loading the legacy provider
Diffstat (limited to 'main/src/ui')
3 files changed, 16 insertions, 4 deletions
diff --git a/main/src/ui/java/de/blinkt/openvpn/activities/ConfigConverter.kt b/main/src/ui/java/de/blinkt/openvpn/activities/ConfigConverter.kt index 5426f669..73a3f75e 100644 --- a/main/src/ui/java/de/blinkt/openvpn/activities/ConfigConverter.kt +++ b/main/src/ui/java/de/blinkt/openvpn/activities/ConfigConverter.kt @@ -37,7 +37,6 @@ import de.blinkt.openvpn.views.FileSelectLayout import de.blinkt.openvpn.views.FileSelectLayout.FileSelectCallback import java.io.* import java.net.URLDecoder -import java.nio.charset.StandardCharsets import java.util.* class ConfigConverter : BaseActivity(), FileSelectCallback, View.OnClickListener { @@ -127,11 +126,16 @@ class ConfigConverter : BaseActivity(), FileSelectCallback, View.OnClickListener } mResult!!.mCompatMode = Utils.mapCompatMode(mCompatmode.selectedItemPosition) + /* If you need compability with such an old version there is a high chance that + the legacy provider is needed as well + */ + if (mResult!!.mCompatMode <= 20400) + mResult!!.mUseLegacyProvider = true; - val `in` = installPKCS12() + val intent = installPKCS12() - if (`in` != null) - startActivityForResult(`in`, RESULT_INSTALLPKCS12) + if (intent != null) + startActivityForResult(intent, RESULT_INSTALLPKCS12) else saveProfile() diff --git a/main/src/ui/java/de/blinkt/openvpn/fragments/Settings_Basic.java b/main/src/ui/java/de/blinkt/openvpn/fragments/Settings_Basic.java index 0899dd13..d4ea3d92 100644 --- a/main/src/ui/java/de/blinkt/openvpn/fragments/Settings_Basic.java +++ b/main/src/ui/java/de/blinkt/openvpn/fragments/Settings_Basic.java @@ -26,6 +26,7 @@ public class Settings_Basic extends KeyChainSettingsFragment implements OnItemSe private FileSelectLayout mCaCert; private FileSelectLayout mClientKey; private CheckBox mUseLzo; + private CheckBox mUseLegacyProvider; private Spinner mType; private Spinner mCompatMode; private FileSelectLayout mpkcs12; @@ -68,6 +69,7 @@ public class Settings_Basic extends KeyChainSettingsFragment implements OnItemSe mpkcs12 = mView.findViewById(id.pkcs12select); mCrlFile = mView.findViewById(id.crlfile); mUseLzo = mView.findViewById(id.lzo); + mUseLegacyProvider = mView.findViewById(R.id.legacyprovider); mType = mView.findViewById(id.type); mCompatMode = mView.findViewById(id.compatmode); mPKCS12Password = mView.findViewById(id.pkcs12password); @@ -191,6 +193,7 @@ public class Settings_Basic extends KeyChainSettingsFragment implements OnItemSe mCrlFile.setData(mProfile.mCrlFilename, getActivity()); mUseLzo.setChecked(mProfile.mUseLzo); + mUseLegacyProvider.setChecked(mProfile.mUseLegacyProvider); mType.setSelection(mProfile.mAuthenticationType); mCompatMode.setSelection(Utils.mapCompatVer(mProfile.mCompatMode)); mpkcs12.setData(mProfile.mPKCS12Filename, getActivity()); diff --git a/main/src/ui/res/layout/basic_settings.xml b/main/src/ui/res/layout/basic_settings.xml index dd2ed25e..8aa4c811 100644 --- a/main/src/ui/res/layout/basic_settings.xml +++ b/main/src/ui/res/layout/basic_settings.xml @@ -40,6 +40,11 @@ /> <CheckBox + android:id="@+id/legacyprovider" + style="@style/item" + android:text="@string/loadossllegacy" /> + + <CheckBox android:id="@+id/lzo" style="@style/item" android:text="@string/useLZO" /> |