Merge branch 'android-proposals'
Makes IKE and ESP proposals configurable.
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
#include <tests/test_suite.h>
|
||||
|
||||
#include <daemon.h>
|
||||
#include <config/proposal.h>
|
||||
#include <crypto/proposal/proposal.h>
|
||||
#include <encoding/payloads/ike_header.h>
|
||||
#include <tkm/client.h>
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
#include <errno.h>
|
||||
|
||||
#include <encoding/payloads/sa_payload.h>
|
||||
#include <config/proposal.h>
|
||||
#include <crypto/proposal/proposal.h>
|
||||
|
||||
typedef struct private_custom_proposal_t private_custom_proposal_t;
|
||||
|
||||
|
||||
@@ -8,8 +8,8 @@ android {
|
||||
applicationId "org.strongswan.android"
|
||||
minSdkVersion 15
|
||||
targetSdkVersion 22
|
||||
versionCode 48
|
||||
versionName "1.9.4"
|
||||
versionCode 49
|
||||
versionName "1.9.5"
|
||||
}
|
||||
|
||||
sourceSets.main {
|
||||
|
||||
@@ -34,6 +34,7 @@ public class VpnProfile implements Cloneable
|
||||
|
||||
private String mName, mGateway, mUsername, mPassword, mCertificate, mUserCertificate;
|
||||
private String mRemoteId, mLocalId, mExcludedSubnets, mIncludedSubnets, mSelectedApps;
|
||||
private String mIkeProposal, mEspProposal;
|
||||
private Integer mMTU, mPort, mSplitTunneling, mNATKeepAlive, mFlags;
|
||||
private SelectedAppsHandling mSelectedAppsHandling = SelectedAppsHandling.SELECTED_APPS_DISABLE;
|
||||
private VpnType mVpnType;
|
||||
@@ -114,6 +115,26 @@ public class VpnProfile implements Cloneable
|
||||
this.mVpnType = type;
|
||||
}
|
||||
|
||||
public String getIkeProposal()
|
||||
{
|
||||
return mIkeProposal;
|
||||
}
|
||||
|
||||
public void setIkeProposal(String proposal)
|
||||
{
|
||||
this.mIkeProposal = proposal;
|
||||
}
|
||||
|
||||
public String getEspProposal()
|
||||
{
|
||||
return mEspProposal;
|
||||
}
|
||||
|
||||
public void setEspProposal(String proposal)
|
||||
{
|
||||
this.mEspProposal = proposal;
|
||||
}
|
||||
|
||||
public String getUsername()
|
||||
{
|
||||
return mUsername;
|
||||
|
||||
+16
-1
@@ -53,6 +53,8 @@ public class VpnProfileDataSource
|
||||
public static final String KEY_SELECTED_APPS_LIST = "selected_apps_list";
|
||||
public static final String KEY_NAT_KEEPALIVE = "nat_keepalive";
|
||||
public static final String KEY_FLAGS = "flags";
|
||||
public static final String KEY_IKE_PROPOSAL = "ike_proposal";
|
||||
public static final String KEY_ESP_PROPOSAL = "esp_proposal";
|
||||
|
||||
private DatabaseHelper mDbHelper;
|
||||
private SQLiteDatabase mDatabase;
|
||||
@@ -61,7 +63,7 @@ public class VpnProfileDataSource
|
||||
private static final String DATABASE_NAME = "strongswan.db";
|
||||
private static final String TABLE_VPNPROFILE = "vpnprofile";
|
||||
|
||||
private static final int DATABASE_VERSION = 14;
|
||||
private static final int DATABASE_VERSION = 15;
|
||||
|
||||
public static final DbColumn[] COLUMNS = new DbColumn[] {
|
||||
new DbColumn(KEY_ID, "INTEGER PRIMARY KEY AUTOINCREMENT", 1),
|
||||
@@ -84,6 +86,8 @@ public class VpnProfileDataSource
|
||||
new DbColumn(KEY_SELECTED_APPS_LIST, "TEXT", 12),
|
||||
new DbColumn(KEY_NAT_KEEPALIVE, "INTEGER", 13),
|
||||
new DbColumn(KEY_FLAGS, "INTEGER", 14),
|
||||
new DbColumn(KEY_IKE_PROPOSAL, "TEXT", 15),
|
||||
new DbColumn(KEY_ESP_PROPOSAL, "TEXT", 15),
|
||||
};
|
||||
|
||||
private static final String[] ALL_COLUMNS = getColumns(DATABASE_VERSION);
|
||||
@@ -212,6 +216,13 @@ public class VpnProfileDataSource
|
||||
db.execSQL("ALTER TABLE " + TABLE_VPNPROFILE + " ADD " + KEY_FLAGS +
|
||||
" INTEGER;");
|
||||
}
|
||||
if (oldVersion < 15)
|
||||
{
|
||||
db.execSQL("ALTER TABLE " + TABLE_VPNPROFILE + " ADD " + KEY_IKE_PROPOSAL +
|
||||
" TEXT;");
|
||||
db.execSQL("ALTER TABLE " + TABLE_VPNPROFILE + " ADD " + KEY_ESP_PROPOSAL +
|
||||
" TEXT;");
|
||||
}
|
||||
}
|
||||
|
||||
private void updateColumns(SQLiteDatabase db, int version)
|
||||
@@ -393,6 +404,8 @@ public class VpnProfileDataSource
|
||||
profile.setSelectedApps(cursor.getString(cursor.getColumnIndex(KEY_SELECTED_APPS_LIST)));
|
||||
profile.setNATKeepAlive(getInt(cursor, cursor.getColumnIndex(KEY_NAT_KEEPALIVE)));
|
||||
profile.setFlags(getInt(cursor, cursor.getColumnIndex(KEY_FLAGS)));
|
||||
profile.setIkeProposal(cursor.getString(cursor.getColumnIndex(KEY_IKE_PROPOSAL)));
|
||||
profile.setEspProposal(cursor.getString(cursor.getColumnIndex(KEY_ESP_PROPOSAL)));
|
||||
return profile;
|
||||
}
|
||||
|
||||
@@ -418,6 +431,8 @@ public class VpnProfileDataSource
|
||||
values.put(KEY_SELECTED_APPS_LIST, profile.getSelectedApps());
|
||||
values.put(KEY_NAT_KEEPALIVE, profile.getNATKeepAlive());
|
||||
values.put(KEY_FLAGS, profile.getFlags());
|
||||
values.put(KEY_IKE_PROPOSAL, profile.getIkeProposal());
|
||||
values.put(KEY_ESP_PROPOSAL, profile.getEspProposal());
|
||||
return values;
|
||||
}
|
||||
|
||||
|
||||
+2
-24
@@ -261,6 +261,8 @@ public class CharonVpnService extends VpnService implements Runnable, VpnStateSe
|
||||
writer.setValue("connection.local_id", mCurrentProfile.getLocalId());
|
||||
writer.setValue("connection.remote_id", mCurrentProfile.getRemoteId());
|
||||
writer.setValue("connection.certreq", (mCurrentProfile.getFlags() & VpnProfile.FLAGS_SUPPRESS_CERT_REQS) == 0);
|
||||
writer.setValue("connection.ike_proposal", mCurrentProfile.getIkeProposal());
|
||||
writer.setValue("connection.esp_proposal", mCurrentProfile.getEspProposal());
|
||||
initiate(writer.serialize());
|
||||
}
|
||||
else
|
||||
@@ -1071,28 +1073,4 @@ public class CharonVpnService extends VpnService implements Runnable, VpnStateSe
|
||||
{
|
||||
return Build.MODEL + " - " + Build.BRAND + "/" + Build.PRODUCT + "/" + Build.MANUFACTURER;
|
||||
}
|
||||
|
||||
/*
|
||||
* The libraries are extracted to /data/data/org.strongswan.android/...
|
||||
* during installation. On newer releases most are loaded in JNI_OnLoad.
|
||||
*/
|
||||
static
|
||||
{
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR2)
|
||||
{
|
||||
System.loadLibrary("strongswan");
|
||||
|
||||
if (MainActivity.USE_BYOD)
|
||||
{
|
||||
System.loadLibrary("tpmtss");
|
||||
System.loadLibrary("tncif");
|
||||
System.loadLibrary("tnccs");
|
||||
System.loadLibrary("imcv");
|
||||
}
|
||||
|
||||
System.loadLibrary("charon");
|
||||
System.loadLibrary("ipsec");
|
||||
}
|
||||
System.loadLibrary("androidbridge");
|
||||
}
|
||||
}
|
||||
|
||||
+26
@@ -18,9 +18,11 @@ package org.strongswan.android.logic;
|
||||
import java.security.Security;
|
||||
|
||||
import org.strongswan.android.security.LocalCertificateKeyStoreProvider;
|
||||
import org.strongswan.android.ui.MainActivity;
|
||||
|
||||
import android.app.Application;
|
||||
import android.content.Context;
|
||||
import android.os.Build;
|
||||
|
||||
public class StrongSwanApplication extends Application
|
||||
{
|
||||
@@ -45,4 +47,28 @@ public class StrongSwanApplication extends Application
|
||||
{
|
||||
return StrongSwanApplication.mContext;
|
||||
}
|
||||
|
||||
/*
|
||||
* The libraries are extracted to /data/data/org.strongswan.android/...
|
||||
* during installation. On newer releases most are loaded in JNI_OnLoad.
|
||||
*/
|
||||
static
|
||||
{
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR2)
|
||||
{
|
||||
System.loadLibrary("strongswan");
|
||||
|
||||
if (MainActivity.USE_BYOD)
|
||||
{
|
||||
System.loadLibrary("tpmtss");
|
||||
System.loadLibrary("tncif");
|
||||
System.loadLibrary("tnccs");
|
||||
System.loadLibrary("imcv");
|
||||
}
|
||||
|
||||
System.loadLibrary("charon");
|
||||
System.loadLibrary("ipsec");
|
||||
}
|
||||
System.loadLibrary("androidbridge");
|
||||
}
|
||||
}
|
||||
|
||||
+42
-1
@@ -37,6 +37,7 @@ import android.text.SpannableString;
|
||||
import android.text.Spanned;
|
||||
import android.text.TextUtils;
|
||||
import android.text.TextWatcher;
|
||||
import android.text.method.LinkMovementMethod;
|
||||
import android.util.Log;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuInflater;
|
||||
@@ -69,6 +70,7 @@ import org.strongswan.android.ui.adapter.CertificateIdentitiesAdapter;
|
||||
import org.strongswan.android.ui.widget.TextInputLayoutHelper;
|
||||
import org.strongswan.android.utils.Constants;
|
||||
import org.strongswan.android.utils.IPRangeSet;
|
||||
import org.strongswan.android.utils.Utils;
|
||||
|
||||
import java.security.cert.X509Certificate;
|
||||
import java.util.ArrayList;
|
||||
@@ -126,6 +128,10 @@ public class VpnProfileDetailActivity extends AppCompatActivity
|
||||
private CheckBox mBlockIPv6;
|
||||
private Spinner mSelectSelectedAppsHandling;
|
||||
private RelativeLayout mSelectApps;
|
||||
private TextInputLayoutHelper mIkeProposalWrap;
|
||||
private EditText mIkeProposal;
|
||||
private TextInputLayoutHelper mEspProposalWrap;
|
||||
private EditText mEspProposal;
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState)
|
||||
@@ -181,6 +187,13 @@ public class VpnProfileDetailActivity extends AppCompatActivity
|
||||
mSelectSelectedAppsHandling = (Spinner)findViewById(R.id.apps_handling);
|
||||
mSelectApps = (RelativeLayout)findViewById(R.id.select_applications);
|
||||
|
||||
mIkeProposal = (EditText)findViewById(R.id.ike_proposal);
|
||||
mIkeProposalWrap = (TextInputLayoutHelper)findViewById(R.id.ike_proposal_wrap);
|
||||
mEspProposal = (EditText)findViewById(R.id.esp_proposal);
|
||||
mEspProposalWrap = (TextInputLayoutHelper)findViewById(R.id.esp_proposal_wrap);
|
||||
/* make the link clickable */
|
||||
((TextView)findViewById(R.id.proposal_intro)).setMovementMethod(LinkMovementMethod.getInstance());
|
||||
|
||||
final SpaceTokenizer spaceTokenizer = new SpaceTokenizer();
|
||||
mName.setTokenizer(spaceTokenizer);
|
||||
mRemoteId.setTokenizer(spaceTokenizer);
|
||||
@@ -546,7 +559,8 @@ public class VpnProfileDetailActivity extends AppCompatActivity
|
||||
mProfile.getPort() != null || mProfile.getNATKeepAlive() != null ||
|
||||
(flags != null && flags != 0) || (st != null && st != 0) ||
|
||||
mProfile.getIncludedSubnets() != null || mProfile.getExcludedSubnets() != null ||
|
||||
mProfile.getSelectedAppsHandling() != SelectedAppsHandling.SELECTED_APPS_DISABLE;
|
||||
mProfile.getSelectedAppsHandling() != SelectedAppsHandling.SELECTED_APPS_DISABLE ||
|
||||
mProfile.getIkeProposal() != null || mProfile.getEspProposal() != null;
|
||||
}
|
||||
mShowAdvanced.setVisibility(!show ? View.VISIBLE : View.GONE);
|
||||
mAdvancedSettings.setVisibility(show ? View.VISIBLE : View.GONE);
|
||||
@@ -640,6 +654,16 @@ public class VpnProfileDetailActivity extends AppCompatActivity
|
||||
Constants.NAT_KEEPALIVE_MIN, Constants.NAT_KEEPALIVE_MAX));
|
||||
valid = false;
|
||||
}
|
||||
if (!validateProposal(mIkeProposal, true))
|
||||
{
|
||||
mIkeProposalWrap.setError(getString(R.string.alert_text_no_proposal));
|
||||
valid = false;
|
||||
}
|
||||
if (!validateProposal(mEspProposal, false))
|
||||
{
|
||||
mEspProposalWrap.setError(getString(R.string.alert_text_no_proposal));
|
||||
valid = false;
|
||||
}
|
||||
return valid;
|
||||
}
|
||||
|
||||
@@ -686,6 +710,10 @@ public class VpnProfileDetailActivity extends AppCompatActivity
|
||||
mProfile.setSplitTunneling(st == 0 ? null : st);
|
||||
mProfile.setSelectedAppsHandling(mSelectedAppsHandling);
|
||||
mProfile.setSelectedApps(mSelectedApps);
|
||||
String ike = mIkeProposal.getText().toString().trim();
|
||||
mProfile.setIkeProposal(ike.isEmpty() ? null : ike);
|
||||
String esp = mEspProposal.getText().toString().trim();
|
||||
mProfile.setEspProposal(esp.isEmpty() ? null : esp);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -719,6 +747,8 @@ public class VpnProfileDetailActivity extends AppCompatActivity
|
||||
mBlockIPv6.setChecked(mProfile.getSplitTunneling() != null && (mProfile.getSplitTunneling() & VpnProfile.SPLIT_TUNNELING_BLOCK_IPV6) != 0);
|
||||
mSelectedAppsHandling = mProfile.getSelectedAppsHandling();
|
||||
mSelectedApps = mProfile.getSelectedAppsSet();
|
||||
mIkeProposal.setText(mProfile.getIkeProposal());
|
||||
mEspProposal.setText(mProfile.getEspProposal());
|
||||
flags = mProfile.getFlags();
|
||||
useralias = mProfile.getUserCertificateAlias();
|
||||
local_id = mProfile.getLocalId();
|
||||
@@ -826,6 +856,17 @@ public class VpnProfileDetailActivity extends AppCompatActivity
|
||||
return value.isEmpty() || IPRangeSet.fromString(value) != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check that the value in the given text box is a valid proposal
|
||||
*
|
||||
* @param view text box
|
||||
*/
|
||||
private boolean validateProposal(EditText view, boolean ike)
|
||||
{
|
||||
String value = view.getText().toString().trim();
|
||||
return value.isEmpty() || Utils.isProposalValid(ike, value);
|
||||
}
|
||||
|
||||
private class SelectUserCertOnClickListener implements OnClickListener, KeyChainAliasCallback
|
||||
{
|
||||
@Override
|
||||
|
||||
+16
@@ -59,6 +59,7 @@ import org.strongswan.android.security.TrustedCertificateEntry;
|
||||
import org.strongswan.android.ui.widget.TextInputLayoutHelper;
|
||||
import org.strongswan.android.utils.Constants;
|
||||
import org.strongswan.android.utils.IPRangeSet;
|
||||
import org.strongswan.android.utils.Utils;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
@@ -497,6 +498,8 @@ public class VpnProfileImportActivity extends AppCompatActivity
|
||||
}
|
||||
}
|
||||
|
||||
profile.setIkeProposal(getProposal(obj, "ike-proposal", true));
|
||||
profile.setEspProposal(getProposal(obj, "esp-proposal", false));
|
||||
profile.setMTU(getInteger(obj, "mtu", Constants.MTU_MIN, Constants.MTU_MAX));
|
||||
profile.setNATKeepAlive(getInteger(obj, "nat-keepalive", Constants.NAT_KEEPALIVE_MIN, Constants.NAT_KEEPALIVE_MAX));
|
||||
JSONObject split = obj.optJSONObject("split-tunneling");
|
||||
@@ -534,6 +537,19 @@ public class VpnProfileImportActivity extends AppCompatActivity
|
||||
return res < min || res > max ? null : res;
|
||||
}
|
||||
|
||||
private String getProposal(JSONObject obj, String key, boolean ike) throws JSONException
|
||||
{
|
||||
String value = obj.optString(key, null);
|
||||
if (!TextUtils.isEmpty(value))
|
||||
{
|
||||
if (!Utils.isProposalValid(ike, value))
|
||||
{
|
||||
throw new JSONException(getString(R.string.profile_import_failed_value, key));
|
||||
}
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
private String getSubnets(JSONObject split, String key) throws JSONException
|
||||
{
|
||||
ArrayList<String> subnets = new ArrayList<>();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (C) 2014 Tobias Brunner
|
||||
* Hochschule fuer Technik Rapperswil
|
||||
* Copyright (C) 2014-2017 Tobias Brunner
|
||||
* HSR Hochschule fuer Technik Rapperswil
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
@@ -37,4 +37,13 @@ public class Utils
|
||||
}
|
||||
return new String(hex);
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate the given proposal string
|
||||
*
|
||||
* @param ike true for IKE, false for ESP
|
||||
* @param proposal proposal string
|
||||
* @return true if valid
|
||||
*/
|
||||
public native static boolean isProposalValid(boolean ike, String proposal);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2016 Tobias Brunner
|
||||
* Copyright (C) 2010-2017 Tobias Brunner
|
||||
* Copyright (C) 2012 Giuliano Grassi
|
||||
* Copyright (C) 2012 Ralf Sager
|
||||
* HSR Hochschule fuer Technik Rapperswil
|
||||
@@ -707,6 +707,27 @@ static bool add_auth_cfg_cert(private_android_service_t *this,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static proposal_t *parse_proposal(private_android_service_t *this,
|
||||
protocol_id_t proto, char *opt)
|
||||
{
|
||||
proposal_t *proposal = NULL;
|
||||
char *prop;
|
||||
|
||||
prop = this->settings->get_str(this->settings, opt, NULL);
|
||||
if (!prop || !strlen(prop))
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
proposal = proposal_create_from_string(proto, prop);
|
||||
if (!proposal)
|
||||
{
|
||||
DBG1(DBG_CFG, "invalid %N proposal '%s', falling back to defaults",
|
||||
protocol_id_names, proto, prop);
|
||||
}
|
||||
return proposal;
|
||||
}
|
||||
|
||||
static job_requeue_t initiate(private_android_service_t *this)
|
||||
{
|
||||
identification_t *gateway = NULL;
|
||||
@@ -714,6 +735,7 @@ static job_requeue_t initiate(private_android_service_t *this)
|
||||
peer_cfg_t *peer_cfg;
|
||||
child_cfg_t *child_cfg;
|
||||
traffic_selector_t *ts;
|
||||
proposal_t *proposal;
|
||||
ike_sa_t *ike_sa;
|
||||
auth_cfg_t *auth;
|
||||
peer_cfg_create_t peer = {
|
||||
@@ -747,8 +769,16 @@ static job_requeue_t initiate(private_android_service_t *this)
|
||||
ike_cfg = ike_cfg_create(IKEV2, certreq, TRUE, "0.0.0.0",
|
||||
charon->socket->get_port(charon->socket, FALSE),
|
||||
server, port, FRAGMENTATION_YES, 0);
|
||||
ike_cfg->add_proposal(ike_cfg, proposal_create_default(PROTO_IKE));
|
||||
ike_cfg->add_proposal(ike_cfg, proposal_create_default_aead(PROTO_IKE));
|
||||
proposal = parse_proposal(this, PROTO_IKE, "connection.ike_proposal");
|
||||
if (proposal)
|
||||
{
|
||||
ike_cfg->add_proposal(ike_cfg, proposal);
|
||||
}
|
||||
else
|
||||
{
|
||||
ike_cfg->add_proposal(ike_cfg, proposal_create_default(PROTO_IKE));
|
||||
ike_cfg->add_proposal(ike_cfg, proposal_create_default_aead(PROTO_IKE));
|
||||
}
|
||||
|
||||
peer_cfg = peer_cfg_create("android", ike_cfg, &peer);
|
||||
peer_cfg->add_virtual_ip(peer_cfg, host_create_any(AF_INET));
|
||||
@@ -795,27 +825,34 @@ static job_requeue_t initiate(private_android_service_t *this)
|
||||
peer_cfg->add_auth_cfg(peer_cfg, auth, FALSE);
|
||||
|
||||
child_cfg = child_cfg_create("android", &child);
|
||||
/* create ESP proposals with and without DH groups, let responder decide
|
||||
* if PFS is used */
|
||||
child_cfg->add_proposal(child_cfg, proposal_create_from_string(PROTO_ESP,
|
||||
"aes128gcm16-aes256gcm16-chacha20poly1305-"
|
||||
"curve25519-ecp256-modp3072"));
|
||||
child_cfg->add_proposal(child_cfg, proposal_create_from_string(PROTO_ESP,
|
||||
"aes128-sha256-curve25519-ecp256-modp3072"));
|
||||
child_cfg->add_proposal(child_cfg, proposal_create_from_string(PROTO_ESP,
|
||||
"aes256-sha384-ecp521-modp8192"));
|
||||
child_cfg->add_proposal(child_cfg, proposal_create_from_string(PROTO_ESP,
|
||||
"aes128-aes192-aes256-sha1-sha256-sha384-sha512-"
|
||||
"curve25519-ecp256-ecp384-ecp521-"
|
||||
"modp2048-modp3072-modp4096"));
|
||||
child_cfg->add_proposal(child_cfg, proposal_create_from_string(PROTO_ESP,
|
||||
"aes128gcm16-aes256gcm16-chacha20poly1305"));
|
||||
child_cfg->add_proposal(child_cfg, proposal_create_from_string(PROTO_ESP,
|
||||
"aes128-sha256"));
|
||||
child_cfg->add_proposal(child_cfg, proposal_create_from_string(PROTO_ESP,
|
||||
"aes256-sha384"));
|
||||
child_cfg->add_proposal(child_cfg, proposal_create_from_string(PROTO_ESP,
|
||||
"aes128-aes192-aes256-sha1-sha256-sha384-sha512"));
|
||||
proposal = parse_proposal(this, PROTO_ESP, "connection.esp_proposal");
|
||||
if (proposal)
|
||||
{
|
||||
child_cfg->add_proposal(child_cfg, proposal);
|
||||
}
|
||||
else
|
||||
{ /* create ESP proposals with and without DH groups, let responder decide
|
||||
* if PFS is used */
|
||||
child_cfg->add_proposal(child_cfg, proposal_create_from_string(PROTO_ESP,
|
||||
"aes128gcm16-aes256gcm16-chacha20poly1305-"
|
||||
"curve25519-ecp256-modp3072"));
|
||||
child_cfg->add_proposal(child_cfg, proposal_create_from_string(PROTO_ESP,
|
||||
"aes128-sha256-curve25519-ecp256-modp3072"));
|
||||
child_cfg->add_proposal(child_cfg, proposal_create_from_string(PROTO_ESP,
|
||||
"aes256-sha384-ecp521-modp8192"));
|
||||
child_cfg->add_proposal(child_cfg, proposal_create_from_string(PROTO_ESP,
|
||||
"aes128-aes192-aes256-sha1-sha256-sha384-sha512-"
|
||||
"curve25519-ecp256-ecp384-ecp521-"
|
||||
"modp2048-modp3072-modp4096"));
|
||||
child_cfg->add_proposal(child_cfg, proposal_create_from_string(PROTO_ESP,
|
||||
"aes128gcm16-aes256gcm16-chacha20poly1305"));
|
||||
child_cfg->add_proposal(child_cfg, proposal_create_from_string(PROTO_ESP,
|
||||
"aes128-sha256"));
|
||||
child_cfg->add_proposal(child_cfg, proposal_create_from_string(PROTO_ESP,
|
||||
"aes256-sha384"));
|
||||
child_cfg->add_proposal(child_cfg, proposal_create_from_string(PROTO_ESP,
|
||||
"aes128-aes192-aes256-sha1-sha256-sha384-sha512"));
|
||||
}
|
||||
ts = traffic_selector_create_from_cidr("0.0.0.0/0", 0, 0, 65535);
|
||||
child_cfg->add_traffic_selector(child_cfg, TRUE, ts);
|
||||
ts = traffic_selector_create_from_cidr("0.0.0.0/0", 0, 0, 65535);
|
||||
|
||||
@@ -712,5 +712,33 @@ JNI_METHOD(CharonVpnService, initiate, void,
|
||||
|
||||
config = androidjni_convert_jstring(env, jconfig);
|
||||
settings = settings_create_string(config);
|
||||
free(config);
|
||||
|
||||
initiate(settings);
|
||||
}
|
||||
|
||||
/**
|
||||
* Utility function to verify proposal strings (static, so `this` is the class)
|
||||
*/
|
||||
JNI_METHOD_P(org_strongswan_android_utils, Utils, isProposalValid, jboolean,
|
||||
jboolean ike, jstring proposal)
|
||||
{
|
||||
proposal_t *prop;
|
||||
char *str;
|
||||
bool valid;
|
||||
|
||||
dbg = dbg_android;
|
||||
|
||||
if (!library_init(NULL, "charon"))
|
||||
{
|
||||
library_deinit();
|
||||
return FALSE;
|
||||
}
|
||||
str = androidjni_convert_jstring(env, proposal);
|
||||
prop = proposal_create_from_string(ike ? PROTO_IKE : PROTO_ESP, str);
|
||||
valid = prop != NULL;
|
||||
DESTROY_IF(prop);
|
||||
free(str);
|
||||
library_deinit();
|
||||
return valid;
|
||||
}
|
||||
|
||||
@@ -362,6 +362,58 @@
|
||||
android:id="@+id/select_applications"
|
||||
layout="@layout/two_line_button" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:layout_marginLeft="4dp"
|
||||
android:layout_marginStart="4dp"
|
||||
android:textSize="20sp"
|
||||
android:text="@string/profile_proposals_label" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/proposal_intro"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:layout_marginLeft="4dp"
|
||||
android:textSize="12sp"
|
||||
android:text="@string/profile_proposals_intro" />
|
||||
|
||||
<org.strongswan.android.ui.widget.TextInputLayoutHelper
|
||||
android:id="@+id/ike_proposal_wrap"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:helper_text="@string/profile_proposals_ike_hint" >
|
||||
|
||||
<android.support.design.widget.TextInputEditText
|
||||
android:id="@+id/ike_proposal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:singleLine="true"
|
||||
android:inputType="textNoSuggestions"
|
||||
android:hint="@string/profile_proposals_ike_label" />
|
||||
|
||||
</org.strongswan.android.ui.widget.TextInputLayoutHelper>
|
||||
|
||||
<org.strongswan.android.ui.widget.TextInputLayoutHelper
|
||||
android:id="@+id/esp_proposal_wrap"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:helper_text="@string/profile_proposals_esp_hint" >
|
||||
|
||||
<android.support.design.widget.TextInputEditText
|
||||
android:id="@+id/esp_proposal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:singleLine="true"
|
||||
android:inputType="textNoSuggestions"
|
||||
android:hint="@string/profile_proposals_esp_label" />
|
||||
|
||||
</org.strongswan.android.ui.widget.TextInputLayoutHelper>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -96,6 +96,12 @@
|
||||
<string name="profile_select_no_apps">Keine Apps ausgewählt</string>
|
||||
<string name="profile_select_one_app">Eine App ausgewählt</string>
|
||||
<string name="profile_select_x_apps">%1$d Apps ausgewählt</string>
|
||||
<string name="profile_proposals_label">Algorithmen</string>
|
||||
<string name="profile_proposals_intro">Optionale spezifische Algorithmen für IKEv2 und/oder IPsec/ESP die statt der Standardwerte verwendet werden sollen. Eine <a href="https://wiki.strongswan.org/projects/strongswan/wiki/IKEv2CipherSuites">Liste gültiger Algorithmen</a> kann unserem Wiki entnommen werden (nicht alle werden von dieser App unterstützt). Beide Felder erwarten eine Liste von Algorithmen, jeweils mit einem Bindestrich getrennt.</string>
|
||||
<string name="profile_proposals_ike_label">IKEv2 Algorithmen</string>
|
||||
<string name="profile_proposals_ike_hint">Für non-AEAD/klassische Verschlüsselungsalgorithmen wird ein Integritätsalgorithmus, eine pseudozufällige Funktion (PRF, optional, ansonsten wird eine auf dem Integritätsalgorithmus basierende verwendet) und eine Diffie-Hellman Gruppe benötigt (z.B. aes256-sha256-ecp256). Für kombinierte/AEAD Algorithmen wird der Integritätsalgorithmus weggelassen aber eine PRF wird benötigt (z.B. aes256gcm16-prfsha256-ecp256).</string>
|
||||
<string name="profile_proposals_esp_label">IPsec/ESP Algorithmen</string>
|
||||
<string name="profile_proposals_esp_hint">Für non-AEAD/klassische Verschlüsselungsalgorithmen wird ein Integritätsalgorithmus benötigt, eine Diffie-Hellman Gruppe ist optional (z.B. aes256-sha256 oder aes256-sha256-ecp256). Für kombinierte/AEAD Algorithmen wird der Integritätsalgorithmus weggelassen (z.B. aes256gcm16 oder aes256gcm16-ecp256). Falls eine DH Gruppe angegeben wird, kommt während dem IPsec SA Rekeying ein DH Schlüsselaustausch zur Anwendung. Beim initialen Verbindungsaufbau hat eine DH Gruppe hier keinen Einfluss, weil die Schlüssel dort von der IKE SA abgeleitet werden. Deshalb wird eine Fehlkonfiguration mit dem Server erst später während dem Rekeying zu einem Fehler führen.</string>
|
||||
<string name="profile_import">VPN Profile importieren</string>
|
||||
<string name="profile_import_failed">VPN Profil-Import fehlgeschlagen</string>
|
||||
<string name="profile_import_failed_detail">VPN Profil-Import fehlgeschlagen: %1$s</string>
|
||||
@@ -113,6 +119,7 @@
|
||||
<string name="alert_text_nocertfound">Bitte wählen Sie eines aus oder aktivieren Sie <i>Automatisch wählen</i></string>
|
||||
<string name="alert_text_out_of_range">Bitte geben Sie eine Nummer von %1$d - %2$d ein</string>
|
||||
<string name="alert_text_no_subnets">Bitte geben Sie mit Leerzeichen getrennte, gültige Subnetzte und/oder IP-Adressen ein</string>
|
||||
<string name="alert_text_no_proposal">Bitte geben Sie eine mit Bindestrichen getrennte, gültige Liste von Algorithmen ein</string>
|
||||
<string name="tnc_notice_title">EAP-TNC kann Ihre Privatsphäre beeinträchtigen</string>
|
||||
<string name="tnc_notice_subtitle">Gerätedaten werden an den Server-Betreiber gesendet</string>
|
||||
<string name="tnc_notice_details"><![CDATA[<p>Trusted Network Connect (TNC) erlaubt Server-Betreibern den Gesundheitszustand von Endgeräten zu prüfen.</p><p>Dazu kann der Betreiber Daten verlangen, wie etwa eine eindeutige Identifikationsnummer, eine Liste der installierten Pakete, Systemeinstellungen oder kryptografische Prüfsummen von Dateien.</p><b>Solche Daten werden nur übermittelt nachdem die Identität des Servers geprüft wurde.</b>]]></string>
|
||||
|
||||
@@ -96,6 +96,12 @@
|
||||
<string name="profile_select_no_apps">No applications selected</string>
|
||||
<string name="profile_select_one_app">One application selected</string>
|
||||
<string name="profile_select_x_apps">%1$d applications selected</string>
|
||||
<string name="profile_proposals_label">Algorithms</string>
|
||||
<string name="profile_proposals_intro">Optionally configure specific algorithms to use for IKEv2 and/or IPsec/ESP instead of the defaults. Refer to our wiki for a <a href="https://wiki.strongswan.org/projects/strongswan/wiki/IKEv2CipherSuites">list of algorithm identifiers</a> (note that not all are supported by this app). Both fields take a list of algorithms, each separated by a hyphen.</string>
|
||||
<string name="profile_proposals_ike_label">IKEv2 Algorithms</string>
|
||||
<string name="profile_proposals_ike_hint">For non-AEAD/classic encryption algorithms, an integrity algorithm, a pseudo random function (optional, defaults to one based on the integrity algorithm) and a Diffie-Hellman group are required (e.g. aes256-sha256-ecp256). For combined-mode/AEAD algorithms, the integrity algorithm is omitted but a PRF is required (e.g. aes256gcm16-prfsha256-ecp256).</string>
|
||||
<string name="profile_proposals_esp_label">IPsec/ESP Algorithms</string>
|
||||
<string name="profile_proposals_esp_hint">For non-AEAD/classic encryption algorithms, an integrity algorithm is required, a Diffie-Hellman group is optional (e.g. aes256-sha256 or aes256-sha256-ecp256). For combined-mode/AEAD algorithms, the integrity algorithm is omitted (e.g. aes256gcm16 or aes256gcm16-ecp256). If a DH group is specified IPsec SA rekeying will use a DH key exchange. However, DH groups specified here are not used when the connection is established initially because the keys there are derived from the IKE SA key material. Therefore, any configuration mismatch with the server will only cause errors later during rekeying.</string>
|
||||
<string name="profile_import">Import VPN profile</string>
|
||||
<string name="profile_import_failed">Failed to import VPN profile</string>
|
||||
<string name="profile_import_failed_detail">Failed to import VPN profile: %1$s</string>
|
||||
@@ -113,6 +119,7 @@
|
||||
<string name="alert_text_nocertfound">Wybierz lub uaktywnij jeden <i>Wybierz automatycznie</i></string>
|
||||
<string name="alert_text_out_of_range">Please enter a number in the range from %1$d - %2$d</string>
|
||||
<string name="alert_text_no_subnets">Please enter valid subnets and/or IP addresses, separated by spaces</string>
|
||||
<string name="alert_text_no_proposal">Please enter a valid list of algorithms, separated by hyphens</string>
|
||||
<string name="tnc_notice_title">EAP-TNC may affect your privacy</string>
|
||||
<string name="tnc_notice_subtitle">Device data is sent to the server operator</string>
|
||||
<string name="tnc_notice_details"><![CDATA[<p>Trusted Network Connect (TNC) allows server operators to assess the health of a client device.</p><p>For that purpose the server operator may request data such as a unique identifier, a list of installed packages, system settings, or cryptographic checksums of files.</p><b>Any data will be sent only after verifying the server\'s identity.</b>]]></string>
|
||||
|
||||
@@ -93,6 +93,12 @@
|
||||
<string name="profile_select_no_apps">No applications selected</string>
|
||||
<string name="profile_select_one_app">One application selected</string>
|
||||
<string name="profile_select_x_apps">%1$d applications selected</string>
|
||||
<string name="profile_proposals_label">Algorithms</string>
|
||||
<string name="profile_proposals_intro">Optionally configure specific algorithms to use for IKEv2 and/or IPsec/ESP instead of the defaults. Refer to our wiki for a <a href="https://wiki.strongswan.org/projects/strongswan/wiki/IKEv2CipherSuites">list of algorithm identifiers</a> (note that not all are supported by this app). Both fields take a list of algorithms, each separated by a hyphen.</string>
|
||||
<string name="profile_proposals_ike_label">IKEv2 Algorithms</string>
|
||||
<string name="profile_proposals_ike_hint">For non-AEAD/classic encryption algorithms, an integrity algorithm, a pseudo random function (optional, defaults to one based on the integrity algorithm) and a Diffie-Hellman group are required (e.g. aes256-sha256-ecp256). For combined-mode/AEAD algorithms, the integrity algorithm is omitted but a PRF is required (e.g. aes256gcm16-prfsha256-ecp256).</string>
|
||||
<string name="profile_proposals_esp_label">IPsec/ESP Algorithms</string>
|
||||
<string name="profile_proposals_esp_hint">For non-AEAD/classic encryption algorithms, an integrity algorithm is required, a Diffie-Hellman group is optional (e.g. aes256-sha256 or aes256-sha256-ecp256). For combined-mode/AEAD algorithms, the integrity algorithm is omitted (e.g. aes256gcm16 or aes256gcm16-ecp256). If a DH group is specified IPsec SA rekeying will use a DH key exchange. However, DH groups specified here are not used when the connection is established initially because the keys there are derived from the IKE SA key material. Therefore, any configuration mismatch with the server will only cause errors later during rekeying.</string>
|
||||
<string name="profile_import">Import VPN profile</string>
|
||||
<string name="profile_import_failed">Failed to import VPN profile</string>
|
||||
<string name="profile_import_failed_detail">Failed to import VPN profile: %1$s</string>
|
||||
@@ -110,6 +116,7 @@
|
||||
<string name="alert_text_nocertfound">Пожалуйста выберите один <i>Выбрать автоматически</i></string>
|
||||
<string name="alert_text_out_of_range">Please enter a number in the range from %1$d - %2$d</string>
|
||||
<string name="alert_text_no_subnets">Please enter valid subnets and/or IP addresses, separated by spaces</string>
|
||||
<string name="alert_text_no_proposal">Please enter a valid list of algorithms, separated by hyphens</string>
|
||||
<string name="tnc_notice_title">EAP-TNC may affect your privacy</string>
|
||||
<string name="tnc_notice_subtitle">Device data is sent to the server operator</string>
|
||||
<string name="tnc_notice_details"><![CDATA[<p>Trusted Network Connect (TNC) allows server operators to assess the health of a client device.</p><p>For that purpose the server operator may request data such as a unique identifier, a list of installed packages, system settings, or cryptographic checksums of files.</p><b>Any data will be sent only after verifying the server\'s identity.</b>]]></string>
|
||||
|
||||
@@ -94,6 +94,12 @@
|
||||
<string name="profile_select_no_apps">No applications selected</string>
|
||||
<string name="profile_select_one_app">One application selected</string>
|
||||
<string name="profile_select_x_apps">%1$d applications selected</string>
|
||||
<string name="profile_proposals_label">Algorithms</string>
|
||||
<string name="profile_proposals_intro">Optionally configure specific algorithms to use for IKEv2 and/or IPsec/ESP instead of the defaults. Refer to our wiki for a <a href="https://wiki.strongswan.org/projects/strongswan/wiki/IKEv2CipherSuites">list of algorithm identifiers</a> (note that not all are supported by this app). Both fields take a list of algorithms, each separated by a hyphen.</string>
|
||||
<string name="profile_proposals_ike_label">IKEv2 Algorithms</string>
|
||||
<string name="profile_proposals_ike_hint">For non-AEAD/classic encryption algorithms, an integrity algorithm, a pseudo random function (optional, defaults to one based on the integrity algorithm) and a Diffie-Hellman group are required (e.g. aes256-sha256-ecp256). For combined-mode/AEAD algorithms, the integrity algorithm is omitted but a PRF is required (e.g. aes256gcm16-prfsha256-ecp256).</string>
|
||||
<string name="profile_proposals_esp_label">IPsec/ESP Algorithms</string>
|
||||
<string name="profile_proposals_esp_hint">For non-AEAD/classic encryption algorithms, an integrity algorithm is required, a Diffie-Hellman group is optional (e.g. aes256-sha256 or aes256-sha256-ecp256). For combined-mode/AEAD algorithms, the integrity algorithm is omitted (e.g. aes256gcm16 or aes256gcm16-ecp256). If a DH group is specified IPsec SA rekeying will use a DH key exchange. However, DH groups specified here are not used when the connection is established initially because the keys there are derived from the IKE SA key material. Therefore, any configuration mismatch with the server will only cause errors later during rekeying.</string>
|
||||
<string name="profile_import">Import VPN profile</string>
|
||||
<string name="profile_import_failed">Failed to import VPN profile</string>
|
||||
<string name="profile_import_failed_detail">Failed to import VPN profile: %1$s</string>
|
||||
@@ -111,6 +117,7 @@
|
||||
<string name="alert_text_nocertfound">Будь ласка виберіть один <i>Вибрати автоматично</i></string>
|
||||
<string name="alert_text_out_of_range">Please enter a number in the range from %1$d - %2$d</string>
|
||||
<string name="alert_text_no_subnets">Please enter valid subnets and/or IP addresses, separated by spaces</string>
|
||||
<string name="alert_text_no_proposal">Please enter a valid list of algorithms, separated by hyphens</string>
|
||||
<string name="tnc_notice_title">EAP-TNC may affect your privacy</string>
|
||||
<string name="tnc_notice_subtitle">Device data is sent to the server operator</string>
|
||||
<string name="tnc_notice_details"><![CDATA[<p>Trusted Network Connect (TNC) allows server operators to assess the health of a client device.</p><p>For that purpose the server operator may request data such as a unique identifier, a list of installed packages, system settings, or cryptographic checksums of files.</p><b>Any data will be sent only after verifying the server\'s identity.</b>]]></string>
|
||||
|
||||
@@ -93,6 +93,12 @@
|
||||
<string name="profile_select_no_apps">No applications selected</string>
|
||||
<string name="profile_select_one_app">One application selected</string>
|
||||
<string name="profile_select_x_apps">%1$d applications selected</string>
|
||||
<string name="profile_proposals_label">Algorithms</string>
|
||||
<string name="profile_proposals_intro">Optionally configure specific algorithms to use for IKEv2 and/or IPsec/ESP instead of the defaults. Refer to our wiki for a <a href="https://wiki.strongswan.org/projects/strongswan/wiki/IKEv2CipherSuites">list of algorithm identifiers</a> (note that not all are supported by this app). Both fields take a list of algorithms, each separated by a hyphen.</string>
|
||||
<string name="profile_proposals_ike_label">IKEv2 Algorithms</string>
|
||||
<string name="profile_proposals_ike_hint">For non-AEAD/classic encryption algorithms, an integrity algorithm, a pseudo random function (optional, defaults to one based on the integrity algorithm) and a Diffie-Hellman group are required (e.g. aes256-sha256-ecp256). For combined-mode/AEAD algorithms, the integrity algorithm is omitted but a PRF is required (e.g. aes256gcm16-prfsha256-ecp256).</string>
|
||||
<string name="profile_proposals_esp_label">IPsec/ESP Algorithms</string>
|
||||
<string name="profile_proposals_esp_hint">For non-AEAD/classic encryption algorithms, an integrity algorithm is required, a Diffie-Hellman group is optional (e.g. aes256-sha256 or aes256-sha256-ecp256). For combined-mode/AEAD algorithms, the integrity algorithm is omitted (e.g. aes256gcm16 or aes256gcm16-ecp256). If a DH group is specified IPsec SA rekeying will use a DH key exchange. However, DH groups specified here are not used when the connection is established initially because the keys there are derived from the IKE SA key material. Therefore, any configuration mismatch with the server will only cause errors later during rekeying.</string>
|
||||
<string name="profile_import">导入VPN配置</string>
|
||||
<string name="profile_import_failed">导入VPN配置失败</string>
|
||||
<string name="profile_import_failed_detail">导入VPN配置失败: %1$s</string>
|
||||
@@ -110,6 +116,7 @@
|
||||
<string name="alert_text_nocertfound">请选择一项或激活 <i>自动选择</i></string>
|
||||
<string name="alert_text_out_of_range">请输入一个数字范围从%1$d到%2$d</string>
|
||||
<string name="alert_text_no_subnets">Please enter valid subnets and/or IP addresses, separated by spaces</string>
|
||||
<string name="alert_text_no_proposal">Please enter a valid list of algorithms, separated by hyphens</string>
|
||||
<string name="tnc_notice_title">EAP-TNC可能会影响您的隐私</string>
|
||||
<string name="tnc_notice_subtitle">设备数据已被发送至服务器管理员</string>
|
||||
<string name="tnc_notice_details"><![CDATA[<p>Trusted Network Connect (TNC) 允许服务器管理员评定一个用户设备的状况。</p><p>出于此目的,服务器管理员可能要求以下数据如独立ID、已安装软件列表、系统设置、或加密过的文件校验值。</p><b>任何数据都仅将在验证过服务器的身份ID之后被发出。</b>]]></string>
|
||||
|
||||
@@ -93,6 +93,12 @@
|
||||
<string name="profile_select_no_apps">No applications selected</string>
|
||||
<string name="profile_select_one_app">One application selected</string>
|
||||
<string name="profile_select_x_apps">%1$d applications selected</string>
|
||||
<string name="profile_proposals_label">Algorithms</string>
|
||||
<string name="profile_proposals_intro">Optionally configure specific algorithms to use for IKEv2 and/or IPsec/ESP instead of the defaults. Refer to our wiki for a <a href="https://wiki.strongswan.org/projects/strongswan/wiki/IKEv2CipherSuites">list of algorithm identifiers</a> (note that not all are supported by this app). Both fields take a list of algorithms, each separated by a hyphen.</string>
|
||||
<string name="profile_proposals_ike_label">IKEv2 Algorithms</string>
|
||||
<string name="profile_proposals_ike_hint">For non-AEAD/classic encryption algorithms, an integrity algorithm, a pseudo random function (optional, defaults to one based on the integrity algorithm) and a Diffie-Hellman group are required (e.g. aes256-sha256-ecp256). For combined-mode/AEAD algorithms, the integrity algorithm is omitted but a PRF is required (e.g. aes256gcm16-prfsha256-ecp256).</string>
|
||||
<string name="profile_proposals_esp_label">IPsec/ESP Algorithms</string>
|
||||
<string name="profile_proposals_esp_hint">For non-AEAD/classic encryption algorithms, an integrity algorithm is required, a Diffie-Hellman group is optional (e.g. aes256-sha256 or aes256-sha256-ecp256). For combined-mode/AEAD algorithms, the integrity algorithm is omitted (e.g. aes256gcm16 or aes256gcm16-ecp256). If a DH group is specified IPsec SA rekeying will use a DH key exchange. However, DH groups specified here are not used when the connection is established initially because the keys there are derived from the IKE SA key material. Therefore, any configuration mismatch with the server will only cause errors later during rekeying.</string>
|
||||
<string name="profile_import">匯入VPN設定檔</string>
|
||||
<string name="profile_import_failed">匯入VPN設定檔失敗</string>
|
||||
<string name="profile_import_failed_detail">匯入VPN設定檔失敗: %1$s</string>
|
||||
@@ -110,6 +116,7 @@
|
||||
<string name="alert_text_nocertfound">請選擇一項或啟動 <i>自動選擇</i></string>
|
||||
<string name="alert_text_out_of_range">請輸入一個數字範圍從%1$d到%2$d</string>
|
||||
<string name="alert_text_no_subnets">Please enter valid subnets and/or IP addresses, separated by spaces</string>
|
||||
<string name="alert_text_no_proposal">Please enter a valid list of algorithms, separated by hyphens</string>
|
||||
<string name="tnc_notice_title">EAP-TNC可能會影響您的隱私安全</string>
|
||||
<string name="tnc_notice_subtitle">裝置資料已經發送給伺服器管理者</string>
|
||||
<string name="tnc_notice_details"><![CDATA[<p>Trusted Network Connect (TNC) 可以讓伺服器管理者評估用戶裝置的狀況。</p><p>在這個目的下,伺服器管理者可能會要求以下資料,例如ID、已安裝的App項目、系統設定、或加密檔案驗證值。</p><b>任何資料都只有在驗證伺服器的身分ID之後才會被送出。</b>]]></string>
|
||||
|
||||
@@ -96,6 +96,12 @@
|
||||
<string name="profile_select_no_apps">No applications selected</string>
|
||||
<string name="profile_select_one_app">One application selected</string>
|
||||
<string name="profile_select_x_apps">%1$d applications selected</string>
|
||||
<string name="profile_proposals_label">Algorithms</string>
|
||||
<string name="profile_proposals_intro">Optionally configure specific algorithms to use for IKEv2 and/or IPsec/ESP instead of the defaults. Refer to our wiki for a <a href="https://wiki.strongswan.org/projects/strongswan/wiki/IKEv2CipherSuites">list of algorithm identifiers</a> (note that not all are supported by this app). Both fields take a list of algorithms, each separated by a hyphen.</string>
|
||||
<string name="profile_proposals_ike_label">IKEv2 Algorithms</string>
|
||||
<string name="profile_proposals_ike_hint">For non-AEAD/classic encryption algorithms, an integrity algorithm, a pseudo random function (optional, defaults to one based on the integrity algorithm) and a Diffie-Hellman group are required (e.g. aes256-sha256-ecp256). For combined-mode/AEAD algorithms, the integrity algorithm is omitted but a PRF is required (e.g. aes256gcm16-prfsha256-ecp256).</string>
|
||||
<string name="profile_proposals_esp_label">IPsec/ESP Algorithms</string>
|
||||
<string name="profile_proposals_esp_hint">For non-AEAD/classic encryption algorithms, an integrity algorithm is required, a Diffie-Hellman group is optional (e.g. aes256-sha256 or aes256-sha256-ecp256). For combined-mode/AEAD algorithms, the integrity algorithm is omitted (e.g. aes256gcm16 or aes256gcm16-ecp256). If a DH group is specified IPsec SA rekeying will use a DH key exchange. However, DH groups specified here are not used when the connection is established initially because the keys there are derived from the IKE SA key material. Therefore, any configuration mismatch with the server will only cause errors later during rekeying.</string>
|
||||
<string name="profile_import">Import VPN profile</string>
|
||||
<string name="profile_import_failed">Failed to import VPN profile</string>
|
||||
<string name="profile_import_failed_detail">Failed to import VPN profile: %1$s</string>
|
||||
@@ -113,6 +119,7 @@
|
||||
<string name="alert_text_nocertfound">Please select one or activate <i>Select automatically</i></string>
|
||||
<string name="alert_text_out_of_range">Please enter a number in the range from %1$d - %2$d</string>
|
||||
<string name="alert_text_no_subnets">Please enter valid subnets and/or IP addresses, separated by spaces</string>
|
||||
<string name="alert_text_no_proposal">Please enter a valid list of algorithms, separated by hyphens</string>
|
||||
<string name="tnc_notice_title">EAP-TNC may affect your privacy</string>
|
||||
<string name="tnc_notice_subtitle">Device data is sent to the server operator</string>
|
||||
<string name="tnc_notice_details"><![CDATA[<p>Trusted Network Connect (TNC) allows server operators to assess the health of a client device.</p><p>For that purpose the server operator may request data such as a unique identifier, a list of installed packages, system settings, or cryptographic checksums of files.</p><b>Any data will be sent only after verifying the server\'s identity.</b>]]></string>
|
||||
|
||||
@@ -16,7 +16,6 @@ config/backend_manager.c config/backend_manager.h config/backend.h \
|
||||
config/child_cfg.c config/child_cfg.h \
|
||||
config/ike_cfg.c config/ike_cfg.h \
|
||||
config/peer_cfg.c config/peer_cfg.h \
|
||||
config/proposal.c config/proposal.h \
|
||||
control/controller.c control/controller.h \
|
||||
daemon.c daemon.h \
|
||||
encoding/generator.c encoding/generator.h \
|
||||
|
||||
@@ -14,7 +14,6 @@ config/backend_manager.c config/backend_manager.h config/backend.h \
|
||||
config/child_cfg.c config/child_cfg.h \
|
||||
config/ike_cfg.c config/ike_cfg.h \
|
||||
config/peer_cfg.c config/peer_cfg.h \
|
||||
config/proposal.c config/proposal.h \
|
||||
control/controller.c control/controller.h \
|
||||
daemon.c daemon.h \
|
||||
encoding/generator.c encoding/generator.h \
|
||||
|
||||
@@ -31,7 +31,7 @@ typedef struct child_cfg_create_t child_cfg_create_t;
|
||||
|
||||
#include <library.h>
|
||||
#include <selectors/traffic_selector.h>
|
||||
#include <config/proposal.h>
|
||||
#include <crypto/proposal/proposal.h>
|
||||
#include <kernel/kernel_ipsec.h>
|
||||
|
||||
/**
|
||||
|
||||
@@ -31,7 +31,7 @@ typedef struct ike_cfg_t ike_cfg_t;
|
||||
#include <networking/host.h>
|
||||
#include <collections/linked_list.h>
|
||||
#include <utils/identification.h>
|
||||
#include <config/proposal.h>
|
||||
#include <crypto/proposal/proposal.h>
|
||||
#include <crypto/diffie_hellman.h>
|
||||
|
||||
/**
|
||||
|
||||
@@ -32,7 +32,7 @@ typedef struct peer_cfg_create_t peer_cfg_create_t;
|
||||
#include <utils/identification.h>
|
||||
#include <collections/enumerator.h>
|
||||
#include <selectors/traffic_selector.h>
|
||||
#include <config/proposal.h>
|
||||
#include <crypto/proposal/proposal.h>
|
||||
#include <config/ike_cfg.h>
|
||||
#include <config/child_cfg.h>
|
||||
#include <credentials/auth_cfg.h>
|
||||
|
||||
@@ -55,7 +55,6 @@
|
||||
#include <bus/listeners/sys_logger.h>
|
||||
#include <bus/listeners/file_logger.h>
|
||||
#include <collections/array.h>
|
||||
#include <config/proposal.h>
|
||||
#include <plugins/plugin_feature.h>
|
||||
#include <kernel/kernel_handler.h>
|
||||
#include <processing/jobs/start_action_job.h>
|
||||
@@ -989,11 +988,6 @@ bool libcharon_init()
|
||||
dbg_old = dbg;
|
||||
dbg = dbg_bus;
|
||||
|
||||
lib->printf_hook->add_handler(lib->printf_hook, 'P',
|
||||
proposal_printf_hook,
|
||||
PRINTF_HOOK_ARGTYPE_POINTER,
|
||||
PRINTF_HOOK_ARGTYPE_END);
|
||||
|
||||
if (lib->integrity &&
|
||||
!lib->integrity->check(lib->integrity, "libcharon", libcharon_init))
|
||||
{
|
||||
|
||||
@@ -29,7 +29,7 @@ typedef struct proposal_substructure_t proposal_substructure_t;
|
||||
#include <library.h>
|
||||
#include <encoding/payloads/payload.h>
|
||||
#include <encoding/payloads/transform_substructure.h>
|
||||
#include <config/proposal.h>
|
||||
#include <crypto/proposal/proposal.h>
|
||||
#include <collections/linked_list.h>
|
||||
#include <kernel/kernel_ipsec.h>
|
||||
#include <sa/authenticator.h>
|
||||
|
||||
@@ -32,7 +32,7 @@ typedef struct transform_substructure_t transform_substructure_t;
|
||||
#include <crypto/signers/signer.h>
|
||||
#include <crypto/prfs/prf.h>
|
||||
#include <crypto/crypters/crypter.h>
|
||||
#include <config/proposal.h>
|
||||
#include <crypto/proposal/proposal.h>
|
||||
|
||||
/**
|
||||
* IKEv1 Value for a transform payload.
|
||||
|
||||
@@ -27,7 +27,7 @@ typedef struct delete_child_sa_job_t delete_child_sa_job_t;
|
||||
#include <library.h>
|
||||
#include <sa/ike_sa_id.h>
|
||||
#include <processing/jobs/job.h>
|
||||
#include <config/proposal.h>
|
||||
#include <crypto/proposal/proposal.h>
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -26,7 +26,7 @@ typedef struct rekey_child_sa_job_t rekey_child_sa_job_t;
|
||||
#include <library.h>
|
||||
#include <sa/ike_sa_id.h>
|
||||
#include <processing/jobs/job.h>
|
||||
#include <config/proposal.h>
|
||||
#include <crypto/proposal/proposal.h>
|
||||
|
||||
/**
|
||||
* Class representing an REKEY_CHILD_SA Job.
|
||||
@@ -50,4 +50,5 @@ struct rekey_child_sa_job_t {
|
||||
*/
|
||||
rekey_child_sa_job_t *rekey_child_sa_job_create(protocol_id_t protocol,
|
||||
uint32_t spi, host_t *dst);
|
||||
|
||||
#endif /** REKEY_CHILD_SA_JOB_H_ @}*/
|
||||
|
||||
@@ -26,7 +26,7 @@ typedef struct update_sa_job_t update_sa_job_t;
|
||||
#include <library.h>
|
||||
#include <networking/host.h>
|
||||
#include <processing/jobs/job.h>
|
||||
#include <config/proposal.h>
|
||||
#include <crypto/proposal/proposal.h>
|
||||
|
||||
/**
|
||||
* Update the addresses of an IKE and its CHILD_SAs.
|
||||
|
||||
@@ -30,7 +30,7 @@ typedef struct child_sa_t child_sa_t;
|
||||
#include <library.h>
|
||||
#include <crypto/prf_plus.h>
|
||||
#include <encoding/payloads/proposal_substructure.h>
|
||||
#include <config/proposal.h>
|
||||
#include <crypto/proposal/proposal.h>
|
||||
#include <config/child_cfg.h>
|
||||
|
||||
/**
|
||||
|
||||
@@ -27,7 +27,7 @@ typedef struct keymat_t keymat_t;
|
||||
#include <utils/identification.h>
|
||||
#include <crypto/prfs/prf.h>
|
||||
#include <crypto/aead.h>
|
||||
#include <config/proposal.h>
|
||||
#include <crypto/proposal/proposal.h>
|
||||
#include <config/peer_cfg.h>
|
||||
#include <sa/ike_sa_id.h>
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@ TESTS = libcharon_tests exchange_tests
|
||||
check_PROGRAMS = $(TESTS)
|
||||
|
||||
libcharon_tests_SOURCES = \
|
||||
suites/test_proposal.c \
|
||||
suites/test_ike_cfg.c \
|
||||
suites/test_mem_pool.c \
|
||||
suites/test_message_chapoly.c \
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
* @ingroup libcharon-tests
|
||||
*/
|
||||
|
||||
TEST_SUITE(proposal_suite_create)
|
||||
TEST_SUITE(ike_cfg_suite_create)
|
||||
TEST_SUITE(mem_pool_suite_create)
|
||||
TEST_SUITE_DEPEND(message_chapoly_suite_create, AEAD, ENCR_CHACHA20_POLY1305, 32)
|
||||
|
||||
@@ -8,7 +8,7 @@ asn1/asn1.c asn1/asn1_parser.c asn1/oid.c bio/bio_reader.c bio/bio_writer.c \
|
||||
collections/blocking_queue.c collections/enumerator.c collections/hashtable.c \
|
||||
collections/array.c \
|
||||
collections/linked_list.c crypto/crypters/crypter.c crypto/hashers/hasher.c \
|
||||
crypto/hashers/hash_algorithm_set.c \
|
||||
crypto/hashers/hash_algorithm_set.c crypto/proposal/proposal.c \
|
||||
crypto/proposal/proposal_keywords.c crypto/proposal/proposal_keywords_static.c \
|
||||
crypto/prfs/prf.c crypto/prfs/mac_prf.c crypto/pkcs5.c \
|
||||
crypto/rngs/rng.c crypto/prf_plus.c crypto/signers/signer.c \
|
||||
|
||||
@@ -6,7 +6,7 @@ asn1/asn1.c asn1/asn1_parser.c asn1/oid.c bio/bio_reader.c bio/bio_writer.c \
|
||||
collections/blocking_queue.c collections/enumerator.c collections/hashtable.c \
|
||||
collections/array.c \
|
||||
collections/linked_list.c crypto/crypters/crypter.c crypto/hashers/hasher.c \
|
||||
crypto/hashers/hash_algorithm_set.c \
|
||||
crypto/hashers/hash_algorithm_set.c crypto/proposal/proposal.c \
|
||||
crypto/proposal/proposal_keywords.c crypto/proposal/proposal_keywords_static.c \
|
||||
crypto/prfs/prf.c crypto/prfs/mac_prf.c crypto/pkcs5.c \
|
||||
crypto/rngs/rng.c crypto/prf_plus.c crypto/signers/signer.c \
|
||||
@@ -69,7 +69,7 @@ asn1/asn1.h asn1/asn1_parser.h asn1/oid.h bio/bio_reader.h bio/bio_writer.h \
|
||||
collections/blocking_queue.h collections/enumerator.h collections/hashtable.h \
|
||||
collections/linked_list.h collections/array.h collections/dictionary.h \
|
||||
crypto/crypters/crypter.h crypto/hashers/hasher.h \
|
||||
crypto/hashers/hash_algorithm_set.h crypto/mac.h \
|
||||
crypto/hashers/hash_algorithm_set.h crypto/mac.h crypto/proposal/proposal.h \
|
||||
crypto/proposal/proposal_keywords.h crypto/proposal/proposal_keywords_static.h \
|
||||
crypto/prfs/prf.h crypto/prfs/mac_prf.h crypto/rngs/rng.h crypto/nonce_gen.h \
|
||||
crypto/prf_plus.h crypto/signers/signer.h crypto/signers/mac_signer.h \
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
|
||||
#include "proposal.h"
|
||||
|
||||
#include <daemon.h>
|
||||
#include <collections/array.h>
|
||||
#include <utils/identification.h>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
/**
|
||||
* @defgroup proposal proposal
|
||||
* @{ @ingroup config
|
||||
* @{ @ingroup crypto
|
||||
*/
|
||||
|
||||
#ifndef PROPOSAL_H_
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
/**
|
||||
* @defgroup proposal_keywords proposal_keywords
|
||||
* @{ @ingroup crypto
|
||||
* @{ @ingroup proposal
|
||||
*/
|
||||
|
||||
#ifndef PROPOSAL_KEYWORDS_H_
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#include <collections/hashtable.h>
|
||||
#include <utils/backtrace.h>
|
||||
#include <selectors/traffic_selector.h>
|
||||
#include <crypto/proposal/proposal.h>
|
||||
|
||||
#define CHECKSUM_LIBRARY IPSEC_LIB_DIR"/libchecksum.so"
|
||||
|
||||
@@ -369,6 +370,8 @@ bool library_init(char *settings, const char *namespace)
|
||||
PRINTF_HOOK_ARGTYPE_POINTER, PRINTF_HOOK_ARGTYPE_END);
|
||||
pfh->add_handler(pfh, 'R', traffic_selector_printf_hook,
|
||||
PRINTF_HOOK_ARGTYPE_POINTER, PRINTF_HOOK_ARGTYPE_END);
|
||||
pfh->add_handler(pfh, 'P', proposal_printf_hook,
|
||||
PRINTF_HOOK_ARGTYPE_POINTER, PRINTF_HOOK_ARGTYPE_END);
|
||||
|
||||
this->objects = hashtable_create((hashtable_hash_t)hash,
|
||||
(hashtable_equals_t)equals, 4);
|
||||
|
||||
@@ -47,6 +47,7 @@ libstrongswan_tests_SOURCES = tests.h tests.c \
|
||||
suites/test_auth_cfg.c \
|
||||
suites/test_hasher.c \
|
||||
suites/test_crypter.c \
|
||||
suites/test_proposal.c \
|
||||
suites/test_crypto_factory.c \
|
||||
suites/test_iv_gen.c \
|
||||
suites/test_pen.c \
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@
|
||||
|
||||
#include "test_suite.h"
|
||||
|
||||
#include <config/proposal.h>
|
||||
#include <crypto/proposal/proposal.h>
|
||||
|
||||
static struct {
|
||||
protocol_id_t proto;
|
||||
@@ -40,6 +40,7 @@ TEST_SUITE(printf_suite_create)
|
||||
TEST_SUITE(auth_cfg_suite_create)
|
||||
TEST_SUITE(hasher_suite_create)
|
||||
TEST_SUITE(crypter_suite_create)
|
||||
TEST_SUITE(proposal_suite_create)
|
||||
TEST_SUITE(crypto_factory_suite_create)
|
||||
TEST_SUITE_DEPEND(iv_gen_suite_create, RNG, RNG_STRONG)
|
||||
TEST_SUITE(pen_suite_create)
|
||||
|
||||
Reference in New Issue
Block a user