summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2013-07-12 17:39:33 +0200
committerArne Schwabe <arne@rfc2549.org>2013-07-12 17:39:33 +0200
commit7a6a6c894d5318b66efbe7289d12c9d33278c750 (patch)
tree00ec62d0aff20dcbdf3d0cb14b6e081cbdfc9ab6 /src
parente1359d383c16daf5440210b07d686aac5f0a2678 (diff)
Do not show certificate information on pkcs12 and key dialogs (closes issue #180)
--HG-- extra : rebase_source : cf8d0c01621f7e22033a8a3962c4bc47983753fb
Diffstat (limited to 'src')
-rw-r--r--src/de/blinkt/openvpn/FileSelectLayout.java11
-rw-r--r--src/de/blinkt/openvpn/VPNPreferences.java4
-rw-r--r--src/de/blinkt/openvpn/VpnProfile.java6
3 files changed, 11 insertions, 10 deletions
diff --git a/src/de/blinkt/openvpn/FileSelectLayout.java b/src/de/blinkt/openvpn/FileSelectLayout.java
index f5a01e10..ce2f5b20 100644
--- a/src/de/blinkt/openvpn/FileSelectLayout.java
+++ b/src/de/blinkt/openvpn/FileSelectLayout.java
@@ -15,7 +15,8 @@ import android.widget.TextView;
public class FileSelectLayout extends LinearLayout implements OnClickListener {
- private TextView mDataView;
+ private final boolean mIsCertificate;
+ private TextView mDataView;
private String mData;
private Fragment mFragment;
private int mTaskId;
@@ -25,13 +26,14 @@ public class FileSelectLayout extends LinearLayout implements OnClickListener {
private boolean mShowClear;
private TextView mDataDetails;
- public FileSelectLayout( Context context,AttributeSet attrset) {
+ public FileSelectLayout( Context context, AttributeSet attrset) {
super(context,attrset);
inflate(getContext(), R.layout.file_select, this);
- TypedArray ta = context.obtainStyledAttributes(attrset,R.styleable.FileSelectLayout);
+ TypedArray ta = context.obtainStyledAttributes(attrset, R.styleable.FileSelectLayout);
mTitle = ta.getString(R.styleable.FileSelectLayout_title);
+ mIsCertificate = ta.getBoolean(R.styleable.FileSelectLayout_certificate,true);
TextView tview = (TextView) findViewById(R.id.file_title);
tview.setText(mTitle);
@@ -76,7 +78,8 @@ public class FileSelectLayout extends LinearLayout implements OnClickListener {
mDataView.setText(R.string.inline_file_data);
else
mDataView.setText(data);
- mDataDetails.setText(X509Utils.getCertificateFriendlyName(c,data));
+ if(mIsCertificate)
+ mDataDetails.setText(X509Utils.getCertificateFriendlyName(c,data));
}
}
diff --git a/src/de/blinkt/openvpn/VPNPreferences.java b/src/de/blinkt/openvpn/VPNPreferences.java
index 3f24728a..700734f1 100644
--- a/src/de/blinkt/openvpn/VPNPreferences.java
+++ b/src/de/blinkt/openvpn/VPNPreferences.java
@@ -20,12 +20,9 @@ public class VPNPreferences extends PreferenceActivity {
public VPNPreferences() {
super();
-
}
-
-
@Override
protected void onStop() {
super.onStop();
@@ -81,6 +78,7 @@ public class VPNPreferences extends PreferenceActivity {
}
+
@Override
public void onBuildHeaders(List<Header> target) {
loadHeadersFromResource(R.xml.vpn_headers, target);
diff --git a/src/de/blinkt/openvpn/VpnProfile.java b/src/de/blinkt/openvpn/VpnProfile.java
index 8f8f3c24..53d33b27 100644
--- a/src/de/blinkt/openvpn/VpnProfile.java
+++ b/src/de/blinkt/openvpn/VpnProfile.java
@@ -247,10 +247,10 @@ public class VpnProfile implements Serializable {
String[] ks = getKeyStoreCertificates(context);
cfg += "### From Keystore ####\n";
if (ks != null) {
- cfg += "<ca>\n" + ks[0] + "</ca>\n";
+ cfg += "<ca>\n" + ks[0] + "\n</ca>\n";
if (ks[1] != null)
- cfg += "<extra-certs>\n" + ks[1] + "<extra-certs>\n";
- cfg += "<cert>\n" + ks[2] + "</cert>\n";
+ cfg += "<extra-certs>\n" + ks[1] + "\n<extra-certs>\n";
+ cfg += "<cert>\n" + ks[2] + "\n</cert>\n";
cfg += "management-external-key\n";
} else {
cfg += context.getString(R.string.keychain_access) + "\n";