NativeCrypto: make all DSA errors the same

All the reason codes for DSA to fail are invalid key errors, so make
them all throw InvalidKeyException.

Change-Id: Ifcde4be47ba55411b3693ab7d4d43f4c09e85517
diff --git a/luni/src/main/native/org_apache_harmony_xnet_provider_jsse_NativeCrypto.cpp b/luni/src/main/native/org_apache_harmony_xnet_provider_jsse_NativeCrypto.cpp
index ec36da0..ba68bd0 100644
--- a/luni/src/main/native/org_apache_harmony_xnet_provider_jsse_NativeCrypto.cpp
+++ b/luni/src/main/native/org_apache_harmony_xnet_provider_jsse_NativeCrypto.cpp
@@ -386,8 +386,6 @@
             throwSignatureException(env, message);
         } else if (library == ERR_LIB_RSA && reason == RSA_R_WRONG_SIGNATURE_LENGTH) {
             throwSignatureException(env, message);
-        } else if (library == ERR_LIB_DSA && reason == DSA_R_PARAMETER_ENCODING_ERROR) {
-            throwInvalidKeyException(env, message);
         } else if (library == ERR_LIB_ASN1 && reason == ASN1_R_WRONG_PUBLIC_KEY_TYPE) {
             throwInvalidKeyException(env, message);
         } else if (library == ERR_LIB_EVP && reason == EVP_R_BAD_DECRYPT) {
@@ -396,6 +394,8 @@
             throwIllegalBlockSizeException(env, message);
         } else if (library == ERR_LIB_X509 && reason == X509_R_UNSUPPORTED_ALGORITHM) {
             throwNoSuchAlgorithmException(env, message);
+        } else if (library == ERR_LIB_DSA) {
+            throwInvalidKeyException(env, message);
         } else {
             jniThrowRuntimeException(env, message);
         }