summaryrefslogtreecommitdiff
path: root/src/de/blinkt/openvpn/OpenVpnManagementThread.java
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2012-07-02 17:29:08 +0200
committerArne Schwabe <arne@rfc2549.org>2012-07-02 17:29:08 +0200
commitb42eacfa8da0a642d629714f188cc0fc4c7e601a (patch)
treec57cb03a635528e00ae29a304c28266a4855bd3a /src/de/blinkt/openvpn/OpenVpnManagementThread.java
parentace5e90b3dbc33f0fc34ac2f3dc40d3c990a6a11 (diff)
parentd9608521bf431a648999d06581404fef4ff57ce0 (diff)
Merge
Diffstat (limited to 'src/de/blinkt/openvpn/OpenVpnManagementThread.java')
-rw-r--r--src/de/blinkt/openvpn/OpenVpnManagementThread.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/de/blinkt/openvpn/OpenVpnManagementThread.java b/src/de/blinkt/openvpn/OpenVpnManagementThread.java
index e1b37342..69129eb1 100644
--- a/src/de/blinkt/openvpn/OpenVpnManagementThread.java
+++ b/src/de/blinkt/openvpn/OpenVpnManagementThread.java
@@ -403,9 +403,12 @@ public class OpenVpnManagementThread implements Runnable {
private void processSignCommand(String b64data) {
PrivateKey privkey = mProfile.getKeystoreKey();
Exception err =null;
+
try{
byte[] data = Base64.decode(b64data, Base64.DEFAULT);
- Cipher rsasinger = javax.crypto.Cipher.getInstance("RSA/ECB/PKCS1PADDING");
+
+ Cipher rsasinger = Cipher.getInstance("RSA/ECB/PKCS1PADDING");
+
rsasinger.init(Cipher.ENCRYPT_MODE, privkey);
byte[] signed_bytes = rsasinger.doFinal(data);
@@ -425,8 +428,9 @@ public class OpenVpnManagementThread implements Runnable {
err =e;
}
if(err !=null) {
- OpenVPN.logError(R.string.error_rsa_sign,err.getLocalizedMessage());
+ OpenVPN.logError(R.string.error_rsa_sign,err.getClass().toString(),err.getLocalizedMessage());
}
+
}
}