diff options
author | Arne Schwabe <arne@rfc2549.org> | 2022-07-22 13:18:18 +0200 |
---|---|---|
committer | Arne Schwabe <arne@rfc2549.org> | 2022-07-22 16:35:02 +0200 |
commit | fd3554ab36b8ab20e34a187afdc82ceead470739 (patch) | |
tree | 3b90fe5fe668df6926bfe7ca7d3a286f211b142f /main/src/ui/java/de/blinkt/openvpn/core | |
parent | 4528aba9bad3782cd57c91205799eaf2cccd1e39 (diff) |
Update OpenVPN/OpenVPN3, use xkey in OpenVPN3
Diffstat (limited to 'main/src/ui/java/de/blinkt/openvpn/core')
-rw-r--r-- | main/src/ui/java/de/blinkt/openvpn/core/OpenVPNThreadv3.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/main/src/ui/java/de/blinkt/openvpn/core/OpenVPNThreadv3.java b/main/src/ui/java/de/blinkt/openvpn/core/OpenVPNThreadv3.java index 780fa217..0cbd7ce5 100644 --- a/main/src/ui/java/de/blinkt/openvpn/core/OpenVPNThreadv3.java +++ b/main/src/ui/java/de/blinkt/openvpn/core/OpenVPNThreadv3.java @@ -237,6 +237,9 @@ public class OpenVPNThreadv3 extends ClientAPI_OpenVPNClient implements Runnable VpnStatus.logDebug("Got external PKI signing request from OpenVPN core for algorithm " + signreq.getAlgorithm()); SignaturePadding padding; switch (signreq.getAlgorithm()) { + case "RSA_PKCS1_PSS_PADDING": + padding = SignaturePadding.RSA_PKCS1_PSS_PADDING; + break; case "RSA_PKCS1_PADDING": padding = SignaturePadding.RSA_PKCS1_PADDING; break; @@ -249,7 +252,8 @@ public class OpenVPNThreadv3 extends ClientAPI_OpenVPNClient implements Runnable default: throw new IllegalArgumentException("Illegal padding in sign request" + signreq.getAlgorithm()); } - signreq.setSig(mVp.getSignedData(mService, signreq.getData(), padding, "", "", false)); + boolean needDigest = !signreq.getHashalg().isEmpty(); + signreq.setSig(mVp.getSignedData(mService, signreq.getData(), padding, signreq.getSaltlen(), signreq.getHashalg(), needDigest)); } void setUserPW() { |