summaryrefslogtreecommitdiff
path: root/main/src/ovpn3
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2018-12-04 17:11:31 +0100
committerArne Schwabe <arne@rfc2549.org>2018-12-04 17:11:31 +0100
commitf461027896e3f969798c95651cec0b57ff0f0269 (patch)
treec7b2a1f4bf3ab4a7cf502befdc394b8bce28b6e7 /main/src/ovpn3
parentb3ed4adfc3c4088ca525cf8a994995699648d71d (diff)
Support new OpenVPN3 version with OpenSSL and print OpenVPN versions
Diffstat (limited to 'main/src/ovpn3')
-rw-r--r--main/src/ovpn3/java/de/blinkt/openvpn/core/OpenVPNThreadv3.java39
1 files changed, 15 insertions, 24 deletions
diff --git a/main/src/ovpn3/java/de/blinkt/openvpn/core/OpenVPNThreadv3.java b/main/src/ovpn3/java/de/blinkt/openvpn/core/OpenVPNThreadv3.java
index 078fa218..08f7a156 100644
--- a/main/src/ovpn3/java/de/blinkt/openvpn/core/OpenVPNThreadv3.java
+++ b/main/src/ovpn3/java/de/blinkt/openvpn/core/OpenVPNThreadv3.java
@@ -1,30 +1,13 @@
package de.blinkt.openvpn.core;
-import android.net.*;
-import android.os.Build;
+import android.content.Context;
import de.blinkt.openvpn.R;
-import net.openvpn.ovpn3.*;
-
-import java.lang.Override;
-import java.net.Inet4Address;
-import java.net.Inet6Address;
-import java.util.Locale;
-import java.util.Vector;
-
import de.blinkt.openvpn.VpnProfile;
-
-import android.content.Context;
-import net.openvpn.ovpn3.*;
-import net.openvpn.ovpn3.*;
import net.openvpn.ovpn3.*;
-import net.openvpn.ovpn3.*;
-import net.openvpn.ovpn3.*;
-import net.openvpn.ovpn3.*;
-import net.openvpn.ovpn3.*;
-import net.openvpn.ovpn3.ClientAPI_Config;
-import net.openvpn.ovpn3.ClientAPI_EvalConfig;
-import net.openvpn.ovpn3.ClientAPI_Event;
-import net.openvpn.ovpn3.ClientAPI_ExternalPKICertRequest;
+
+import static net.openvpn.ovpn3.ClientAPI_OpenVPNClient.copyright;
+import static net.openvpn.ovpn3.ClientAPI_OpenVPNClient.init_process;
+import static net.openvpn.ovpn3.ClientAPI_OpenVPNClient.platform;
public class OpenVPNThreadv3 extends ClientAPI_OpenVPNClient implements Runnable, OpenVPNManagement {
@@ -240,8 +223,15 @@ public class OpenVPNThreadv3 extends ClientAPI_OpenVPNClient implements Runnable
@Override
public void external_pki_sign_request(ClientAPI_ExternalPKISignRequest signreq) {
- VpnStatus.logDebug("Got external PKI signing request from OpenVPN core");
- signreq.setSig(mVp.getSignedData(mService, signreq.getData(),true));
+ VpnStatus.logDebug("Got external PKI signing request from OpenVPN core for algorithm " + signreq.getAlgorithm());
+ boolean pkcs1padding;
+ if (signreq.getAlgorithm().equals("RSA_PKCS1_PADDING"))
+ pkcs1padding = true;
+ else if (signreq.getAlgorithm().equals("RSA_NO_PADDING"))
+ pkcs1padding = false;
+ else
+ throw new IllegalArgumentException("Illegal padding in sign request" + signreq.getAlgorithm());
+ signreq.setSig(mVp.getSignedData(mService, signreq.getData(), pkcs1padding));
}
void setUserPW() {
@@ -348,4 +338,5 @@ public class OpenVPNThreadv3 extends ClientAPI_OpenVPNClient implements Runnable
super.pause(reason.toString());
}
+
}