Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
82 commits
Select commit Hold shift + click to select a range
4f90b88
spelling: added
jsoref Jan 31, 2020
8e0305e
spelling: android
jsoref Jan 31, 2020
3ef5852
spelling: architecture
jsoref Jan 31, 2020
4496072
spelling: assume
jsoref Jan 31, 2020
bd6541f
spelling: authentication
jsoref Jan 31, 2020
bd4735c
spelling: authenticator
jsoref Jan 31, 2020
5430100
spelling: been
jsoref Jan 31, 2020
8fe2db4
spelling: building
jsoref Jan 31, 2020
b0cc997
spelling: building_configuration
jsoref Jan 31, 2020
95980b1
spelling: certificate
jsoref Jan 31, 2020
ea32506
spelling: connected
jsoref Jan 31, 2020
1623c2d
spelling: constitutes
jsoref Jan 31, 2020
7894908
spelling: description
jsoref Jan 31, 2020
c4751f0
spelling: different
jsoref Jan 31, 2020
0ca4b8b
spelling: executable
jsoref Jan 31, 2020
ac36e7d
spelling: executesucmd
jsoref Jan 31, 2020
2c2d083
spelling: generate
jsoref Jan 31, 2020
0837680
spelling: iterated
jsoref Jan 31, 2020
e238408
spelling: jbcrypto
jsoref Jan 31, 2020
37b7198
spelling: getlatestdump
jsoref Jan 31, 2020
6ae60e8
spelling: management
jsoref Jan 31, 2020
2ae6956
spelling: managementcommand
jsoref Jan 31, 2020
a7c5b68
spelling: marketing
jsoref Jan 31, 2020
0c36214
spelling: getmarshaledbytes
jsoref Jan 31, 2020
bd0005d
spelling: guarantee
jsoref Jan 31, 2020
96f1d42
spelling: marshalandback
jsoref Jan 31, 2020
18d1e25
spelling: marshaling
jsoref Jan 31, 2020
f965b16
spelling: marshalstring
jsoref Jan 31, 2020
b973cb0
spelling: testmarshalstring
jsoref Jan 31, 2020
5faec05
spelling: testmarshal
jsoref Jan 31, 2020
501358c
spelling: testmarshalargs
jsoref Jan 31, 2020
279ad99
spelling: unmarshalstring
jsoref Jan 31, 2020
f86a392
spelling: matched
jsoref Jan 31, 2020
6824111
spelling: time_period_minutes
jsoref Jan 31, 2020
891c912
spelling: notification
jsoref Jan 31, 2020
21400ab
spelling: notification_title
jsoref Jan 31, 2020
e6bde43
spelling: notification_title_notconnect
jsoref Jan 31, 2020
17aeba7
spelling: officialdebugkey
jsoref Jan 31, 2020
1c043f2
spelling: officialkey
jsoref Jan 31, 2020
9d6b8cb
spelling: onlyfindfileandnullonnotfound
jsoref Jan 31, 2020
f1716b9
spelling: openvpn_copyright
jsoref Jan 31, 2020
99f4a52
spelling: ovpn3cli
jsoref Jan 31, 2020
66d3acb
spelling: permission_hint
jsoref Jan 31, 2020
754c7ba
spelling: persistent
jsoref Jan 31, 2020
e95e5d2
spelling: positive
jsoref Jan 31, 2020
5e3b812
spelling: processpwfailed
jsoref Jan 31, 2020
14d873c
spelling: profilename
jsoref Jan 31, 2020
1d15b4a
spelling: reasons
jsoref Jan 31, 2020
8441283
spelling: checktorreceiver
jsoref Jan 31, 2020
ae0fcf6
spelling: relevant
jsoref Jan 31, 2020
01a54d0
spelling: remember the
jsoref Jan 31, 2020
4b4950b
spelling: setconnectedvpnprofiledisconnected
jsoref Jan 31, 2020
8e95213
spelling: shouldbeconnected
jsoref Jan 31, 2020
0142e84
spelling: standard
jsoref Jan 31, 2020
0316def
spelling: update_ext_alias
jsoref Jan 31, 2020
b28e0b1
spelling: visibility
jsoref Jan 31, 2020
7aeded7
spelling: vpn_authentication
jsoref Jan 31, 2020
b986a12
spelling: derivative
jsoref Jan 31, 2020
9913d9b
spelling: warning_custom
jsoref Jan 31, 2020
53c853e
spelling: workaround
jsoref Jan 31, 2020
83c84ee
spelling: certificates
jsoref Feb 2, 2020
496b618
spelling: checkmarshmallowfileimporterror
jsoref Jan 31, 2020
c8b9307
spelling: cipher
jsoref Feb 2, 2020
8dabcd1
spelling: cipher_dialog_message
jsoref Jan 31, 2020
120fe4e
spelling: contributor
jsoref Feb 2, 2020
06134c5
spelling: corresponds
jsoref Jan 31, 2020
33f1cff
spelling: credentials
jsoref Feb 2, 2020
5111017
spelling: custom_connection_options_warning
jsoref Jan 31, 2020
4c4e9dd
spelling: discard
jsoref Feb 2, 2020
3095086
spelling: exception
jsoref Jan 31, 2020
c48ef7a
spelling: padding
jsoref Feb 2, 2020
7aaf026
spelling: parameters
jsoref Feb 2, 2020
53a725d
spelling: parse
jsoref Jan 31, 2020
ceeafe1
spelling: separate
jsoref Jan 31, 2020
2b6c0fc
spelling: resource
jsoref Feb 2, 2020
e4fce24
spelling: response
jsoref Feb 2, 2020
5b60acc
spelling: slider
jsoref Feb 2, 2020
ee50e50
spelling: speedtest
jsoref Jan 31, 2020
df02c48
spelling: successfully
jsoref Feb 2, 2020
e0dc33b
spelling: test_algorithms
jsoref Jan 31, 2020
2d6b844
spelling: unknown
jsoref Feb 2, 2020
20d48fa
spelling: unmarshal
jsoref Jan 31, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Developing
---------------
If you want to develop on ics-openvpn please read the [doc/README.txt](https://github.com/schwabe/ics-openvpn/blob/master/doc/README.txt) *before* opening issues or emailing me.

Also please note that before contributing to the project that I would like to retain my ability to relicense the project for different third parties and therefore probably need a contributer's agreement from any contributing party. To get started, [sign the Contributor License Agreement](https://www.clahub.com/agreements/schwabe/ics-openvpn).
Also please note that before contributing to the project that I would like to retain my ability to relicense the project for different third parties and therefore probably need a contributor's agreement from any contributing party. To get started, [sign the Contributor License Agreement](https://www.clahub.com/agreements/schwabe/ics-openvpn).

You can help
------------
Expand All @@ -37,7 +37,7 @@ You make your life and that of your users easier if you embed the certificates i

Inline files are supported since OpenVPN 2.1rc1 and documented in the [OpenVPN 2.3 man page](https://community.openvpn.net/openvpn/wiki/Openvpn23ManPage) (under INLINE FILE SUPPORT)

(Using inline certifaces can also make your life on non-Android platforms easier since you only have one file.)
(Using inline certificates can also make your life on non-Android platforms easier since you only have one file.)

For example `ca mycafile.pem` becomes
```
Expand Down
2 changes: 1 addition & 1 deletion doc/LICENSE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Copyright (c) 2012-2014, Arne Schwabe

The name ics-openvpn and OpenVPN for Android refer to the same program.
OpenVPN for Android is distributed under the GPL license version 2 (see Below)
with the following clarification/additional terms of what constitues "deriviate work":
with the following clarification/additional terms of what constitutes "derivative work":

Using/including any part of ics-openvpn, especially using/including any part of the
de.blinkt.openvpn class hierarchy, creates derivative work of ics-openvpn.
Expand Down
2 changes: 1 addition & 1 deletion doc/todo.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ Tap support:
- generate random mac
- strip macs header on receive
- append mac header on send
- implement arp, just discrad real packet and lets Android/other site retry later, "Cisco style"
- implement arp, just discard real packet and lets Android/other site retry later, "Cisco style"


Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ package de.blinkt.openvpn.api;
interface ExternalCertificateProvider {
/**
* Requests signing the data with RSA/ECB/PKCS1PADDING
* for RSA certficate and with NONEwithECDSA for EC certificates
* for RSA certificate and with NONEwithECDSA for EC certificates
* @parm alias the parameter that
*/
byte[] getSignedData(in String alias, in byte[] data);

/**
* Requests the certificate chain for the selected alias
* The first certifcate returned is assumed to be
* The first certificate returned is assumed to be
* the user certificate
*/
byte[] getCertificateChain(in String alias);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ interface IOpenVPNAPIService {
void startProfile (String profileUUID);

/** Use a profile with all certificates etc. embedded,
* old version which does not return the UUID of the addded profile, see
* old version which does not return the UUID of the added profile, see
* below for a version that return the UUID on add */
boolean addVPNProfile (String name, String config);

Expand All @@ -35,10 +35,10 @@ interface IOpenVPNAPIService {
/* Disconnect the VPN */
void disconnect();

/* Pause the VPN (same as using the pause feature in the notifcation bar) */
/* Pause the VPN (same as using the pause feature in the notification bar) */
void pause();

/* Resume the VPN (same as using the pause feature in the notifcation bar) */
/* Resume the VPN (same as using the pause feature in the notification bar) */
void resume();

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ interface IOpenVPNServiceInternal {

boolean isAllowedExternalApp(String packagename);

void challengeResponse(String repsonse);
void challengeResponse(String response);
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ interface IServiceStatus {
void unregisterStatusCallback(in IStatusCallbacks cb);

/**
* Returns the last connedcted VPN
* Returns the last connected VPN
*/
String getLastConnectedVPN();

Expand Down
6 changes: 3 additions & 3 deletions main/src/main/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ if (NOT ${CMAKE_LIBRARY_OUTPUT_DIRECTORY} MATCHES "build/intermediates/cmake/.*s
#INCLUDE(${SWIG_USE_FILE})
#SET_SOURCE_FILES_PROPERTIES(openvpn3/javacli/ovpncli.i PROPERTIES SWIG_FLAGS "-package net.openvpn.ovpn3")
#SET_SOURCE_FILES_PROPERTIES(openvpn3/javacli/ovpncli.i PROPERTIES CPLUSPLUS ON)
#SWIG_ADD_MODULE(ovpen3cli java openvpn3/javacli/ovpncli.i)
#SWIG_ADD_MODULE(ovpn3cli java openvpn3/javacli/ovpncli.i)


set(ovpn3_SRCS
Expand Down Expand Up @@ -95,7 +95,7 @@ if (NOT ${CMAKE_LIBRARY_OUTPUT_DIRECTORY} MATCHES "build/intermediates/cmake/.*s

)
else ()
message("Not budiling OpenVPN for output dir ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}")
message("Not building OpenVPN for output dir ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}")
endif ()

add_library(opvpnutil SHARED opvpnutil/jniglue.c opvpnutil/scan_ifs.c)
Expand All @@ -110,7 +110,7 @@ if (NOT ${CMAKE_LIBRARY_OUTPUT_DIRECTORY} MATCHES "build/intermediates/cmake/.*s
add_library(osslspeedtest SHARED opvpnutil/sslspeed.c)
target_link_libraries(osslspeedtest log crypto ssl)
else ()
message("Not budiling SSLSpeedTest for output dir ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}")
message("Not building SSLSpeedTest for output dir ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}")
endif ()

# The magic Jellybean keystore signing hack. Beware dragons and dlsyms magic ahead
Expand Down
6 changes: 3 additions & 3 deletions main/src/main/cpp/jbcrypto/jbcrypto.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// JBCyrpto.cpp
// JBCrypto.cpp
// xcopenvpn
//
// Created by Arne Schwabe on 12.07.12.
Expand Down Expand Up @@ -97,8 +97,8 @@ jbyteArray Java_de_blinkt_openvpn_core_NativeUtils_rsasign (JNIEnv* env, jclass,
sigret, &siglen, pkey->pkey.rsa) <= 0 ) */

RSA_private_encrypt_dyn=(int (*)(int, const unsigned char *, unsigned char *, RSA *, int)) dlsym(RTLD_DEFAULT, "RSA_private_encrypt");
int paddding = pkcs1padding ? RSA_PKCS1_PADDING : RSA_NO_PADDING;
siglen = RSA_private_encrypt_dyn(datalen,(unsigned char*) data,sigret,pkey->pkey.rsa, paddding);
int padding = pkcs1padding ? RSA_PKCS1_PADDING : RSA_NO_PADDING;
siglen = RSA_private_encrypt_dyn(datalen,(unsigned char*) data,sigret,pkey->pkey.rsa, padding);

if (siglen < 0)
{
Expand Down
2 changes: 1 addition & 1 deletion main/src/main/cpp/openvpn-config/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/* config.h.in. Generated from configure.ac by autoheader. */


/* DISABLE PERSISTEN TUN */
/* DISABLE PERSISTENT TUN */
#undef TUNSETPERSIST

/* Enable deferred authentication */
Expand Down
6 changes: 3 additions & 3 deletions main/src/main/java/de/blinkt/openvpn/LaunchVPN.java
Original file line number Diff line number Diff line change
Expand Up @@ -321,10 +321,10 @@ void launchVPN() {
boolean loadTunModule = prefs.getBoolean("loadTunModule", false);

if (loadTunModule)
execeuteSUcmd("insmod /system/lib/modules/tun.ko");
executeSUcmd("insmod /system/lib/modules/tun.ko");

if (usecm9fix && !mCmfixed) {
execeuteSUcmd("chown system /dev/tun");
executeSUcmd("chown system /dev/tun");
}

if (intent != null) {
Expand All @@ -345,7 +345,7 @@ void launchVPN() {

}

private void execeuteSUcmd(String command) {
private void executeSUcmd(String command) {
try {
ProcessBuilder pb = new ProcessBuilder("su", "-c", command);
Process p = pb.start();
Expand Down
6 changes: 3 additions & 3 deletions main/src/main/java/de/blinkt/openvpn/VpnProfile.java
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ public class VpnProfile implements Serializable, Cloneable {
private static final int AUTH_RETRY_INTERACT = 3;
public static String DEFAULT_DNS1 = "8.8.8.8";
public static String DEFAULT_DNS2 = "8.8.4.4";
// variable named wrong and should haven beeen transient
// but needs to keep wrong name to guarante loading of old
// variable named wrong and should haven been transient
// but needs to keep wrong name to guarantee loading of old
// profiles
public transient boolean profileDeleted = false;
public int mAuthenticationType = TYPE_KEYSTORE;
Expand Down Expand Up @@ -1007,7 +1007,7 @@ public int checkProfile(Context context, boolean useOpenVPN3) {
if (c.mProxyType == Connection.ProxyType.ORBOT) {
if (usesExtraProxyOptions())
return R.string.error_orbot_and_proxy_options;
if (!OrbotHelper.checkTorReceier(context))
if (!OrbotHelper.checkTorReceiver(context))
return R.string.no_orbotfound;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ private void showDisconnectDialog() {
@Override
public void onClick(DialogInterface dialog, int which) {
if (which == DialogInterface.BUTTON_POSITIVE) {
ProfileManager.setConntectedVpnProfileDisconnected(this);
ProfileManager.setConnectedVpnProfileDisconnected(this);
if (mService != null) {
try {
mService.stopVPN(false);
Expand Down
2 changes: 1 addition & 1 deletion main/src/main/java/de/blinkt/openvpn/core/CIDRIP.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public static int calculateLenFromMask(String mask) {
int len;
// Check if rest of netmask is only 1s
if (netmask != (0x1ffffffffl >> lenZeros)) {
// Asume no CIDR, set /32
// Assume no CIDR, set /32
len = 32;
} else {
len = 32 - lenZeros;
Expand Down
6 changes: 3 additions & 3 deletions main/src/main/java/de/blinkt/openvpn/core/ConfigParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ public String getAuthUserPassFile() {

private boolean space(char c) {
// I really hope nobody is using zero bytes inside his/her config file
// to sperate parameter but here we go:
// to separate parameter but here we go:
return Character.isWhitespace(c) || c == '\0';

}
Expand Down Expand Up @@ -471,7 +471,7 @@ public VpnProfile convertProfile() throws ConfigParseError, IOException {
}
// Ignore mtu argument of OpenVPN3 and report error otherwise
if (mssfix.size() >= 3 && !(mssfix.get(2).equals("mtu"))) {
throw new ConfigParseError("Second argument to --mssfix unkonwn");
throw new ConfigParseError("Second argument to --mssfix unknown");
}
}

Expand Down Expand Up @@ -517,7 +517,7 @@ public VpnProfile convertProfile() throws ConfigParseError, IOException {
CIDRIP cidr = new CIDRIP(ifconfig.get(1), ifconfig.get(2));
np.mIPv4Address = cidr.toString();
} catch (NumberFormatException nfe) {
throw new ConfigParseError("Could not pase ifconfig IP address: " + nfe.getLocalizedMessage());
throw new ConfigParseError("Could not parse ifconfig IP address: " + nfe.getLocalizedMessage());
}

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,9 @@ public void userPause(boolean pause) {
}
}

public DeviceStateReceiver(OpenVPNManagement magnagement) {
public DeviceStateReceiver(OpenVPNManagement management) {
super();
mManagement = magnagement;
mManagement = management;
mManagement.setPauseCallback(this);
mDisconnectHandler = new Handler();
}
Expand Down Expand Up @@ -262,7 +262,7 @@ public void networkStateChange(Context context) {

if (!netstatestring.equals(lastStateMsg))
VpnStatus.logInfo(R.string.netstatus, netstatestring);
VpnStatus.logDebug(String.format("Debug state info: %s, pause: %s, shouldbeconnected: %s, network: %s ",
VpnStatus.logDebug(String.format("Debug state info: %s, pause: %s, shouldBeconnected: %s, network: %s ",
netstatestring, getPauseReason(), shouldBeConnected(), network));
lastStateMsg = netstatestring;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ public void onServiceDisconnected(ComponentName name) {
intent.setPackage(packagename);

if (!context.bindService(intent, extAuthServiceConnection, Context.BIND_AUTO_CREATE)) {
throw new KeyChainException("could not bind to external authticator app: " + packagename);
throw new KeyChainException("could not bind to external authenticator app: " + packagename);
}
return new ExternalAuthProviderConnection(context, extAuthServiceConnection, q.take());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ private void writeLogItemToDisk(LogItem li) throws IOException {
// We do not really care if the log cache breaks between Android upgrades,
// write binary format to disc

byte[] liBytes = li.getMarschaledBytes();
byte[] liBytes = li.getMarshaledBytes();

writeEscapedBytes(liBytes);
}
Expand Down
Loading