From c806ea17f9704182be0effe8a5777ec415640441 Mon Sep 17 00:00:00 2001
From: Karel Miko <karel.miko@gmail.com>
Date: Thu, 14 Sep 2017 12:45:45 +0200
Subject: [PATCH] fix dsa_int_validate_xy

---
 src/pk/dsa/dsa_verify_key.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/pk/dsa/dsa_verify_key.c b/src/pk/dsa/dsa_verify_key.c
index 0f84ea0..7cfd117 100644
--- a/src/pk/dsa/dsa_verify_key.c
+++ b/src/pk/dsa/dsa_verify_key.c
@@ -145,7 +145,7 @@ int dsa_int_validate_xy(dsa_key *key, int *stat)
    if ((err = mp_sub_d(key->p, 1, tmp)) != CRYPT_OK) {
       goto error;
    }
-   if (!(mp_cmp_d(key->y, 1) == LTC_MP_GT && mp_cmp(key->y, tmp) == LTC_MP_LT)) {
+   if (mp_cmp_d(key->y, 1) != LTC_MP_GT || mp_cmp(key->y, tmp) != LTC_MP_LT) {
       err = CRYPT_OK;
       goto error;
    }