From 12fdb111c977183f0f744ef54e91f659fdbeff81 Mon Sep 17 00:00:00 2001 From: Christian Hagau Date: Sun, 12 Nov 2017 00:00:00 +0000 Subject: [PATCH] Fix error handling in case of an unsupported algorithm parameter in SshAuthenticationService --- .../keychain/remote/SshAuthenticationService.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/SshAuthenticationService.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/SshAuthenticationService.java index aa4d775ce..4ef16eb72 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/SshAuthenticationService.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/SshAuthenticationService.java @@ -273,8 +273,8 @@ public class SshAuthenticationService extends Service { return createExceptionErrorResult(SshAuthenticationApiError.NO_AUTH_KEY, "Authentication key for master key id not found in keychain", e); } catch (NoSuchAlgorithmException e) { - return createExceptionErrorResult(SshAuthenticationApi.RESULT_CODE_ERROR, - "", e); + return createExceptionErrorResult(SshAuthenticationApiError.INVALID_ALGORITHM, + "Algorithm not supported", e); } } else { return createErrorResult(SshAuthenticationApiError.NO_KEY_ID,