summaryrefslogtreecommitdiff
path: root/src/de/blinkt/openvpn/VpnProfile.java
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2013-03-07 23:40:30 +0100
committerArne Schwabe <arne@rfc2549.org>2013-03-07 23:40:30 +0100
commitb38cae44de5aed8d436c19301c4fb4a390128569 (patch)
tree5cf342ab4f1b2baf33957ff25312b2f7e836c754 /src/de/blinkt/openvpn/VpnProfile.java
parent00cdc87d34a817de8a7473f3e41871621705d417 (diff)
verify-x509-name not x509-verify-name
Diffstat (limited to 'src/de/blinkt/openvpn/VpnProfile.java')
-rw-r--r--src/de/blinkt/openvpn/VpnProfile.java21
1 files changed, 14 insertions, 7 deletions
diff --git a/src/de/blinkt/openvpn/VpnProfile.java b/src/de/blinkt/openvpn/VpnProfile.java
index fcb0679f..ee202369 100644
--- a/src/de/blinkt/openvpn/VpnProfile.java
+++ b/src/de/blinkt/openvpn/VpnProfile.java
@@ -274,9 +274,16 @@ public class VpnProfile implements Serializable{
if(!configForOvpn3) {
String[] ks =getKeyStoreCertificates(context);
cfg+="### From Keystore ####\n";
- cfg+="<ca>\n" + ks[0] + "</ca>\n";
- cfg+="<cert>\n" + ks[0] + "</cert>\n";
- cfg+="management-external-key\n";
+ if(ks != null) {
+ cfg+="<ca>\n" + ks[0] + "</ca>\n";
+ cfg+="<cert>\n" + ks[0] + "</cert>\n";
+ cfg+="management-external-key\n";
+ } else {
+ cfg += context.getString(R.string.keychain_access) +"\n";
+ if(Build.VERSION.SDK_INT==Build.VERSION_CODES.JELLY_BEAN)
+ if(!mAlias.matches("^[a-zA-Z0-9]$"))
+ cfg += context.getString(R.string.jelly_keystore_alphanumeric_bug)+ "\n";
+ }
}
break;
case VpnProfile.TYPE_USERPASS:
@@ -358,7 +365,7 @@ public class VpnProfile implements Serializable{
// Authentication
if(mCheckRemoteCN) {
if(mRemoteCN == null || mRemoteCN.equals("") )
- cfg+="x509-verify-name " + mServerName + " name\n";
+ cfg+="verify-x509-name " + mServerName + " name\n";
else
switch (mX509AuthType) {
@@ -370,15 +377,15 @@ public class VpnProfile implements Serializable{
break;
case X509_VERIFY_TLSREMOTE_RDN:
- cfg+="x509-verify-name " + openVpnEscape(mRemoteCN) + " name\n";
+ cfg+="verify-x509-name " + openVpnEscape(mRemoteCN) + " name\n";
break;
case X509_VERIFY_TLSREMOTE_RDN_PREFIX:
- cfg+="x509-verify-name " + openVpnEscape(mRemoteCN) + " name-prefix\n";
+ cfg+="verify-x509-name " + openVpnEscape(mRemoteCN) + " name-prefix\n";
break;
case X509_VERIFY_TLSREMOTE_DN:
- cfg+="x509-verify-name " + openVpnEscape(mRemoteCN) + "\n";
+ cfg+="verify-x509-name " + openVpnEscape(mRemoteCN) + "\n";
break;
}
}