aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgrothoff <grothoff@140774ce-b5e7-0310-ab8b-a85725594a96>2012-05-04 07:49:36 +0000
committergrothoff <grothoff@140774ce-b5e7-0310-ab8b-a85725594a96>2012-05-04 07:49:36 +0000
commitf81e5ce59aae3ee8751fd77a047dfc05c557220a (patch)
treebb3217391563d24c751bdf1efc70c5b8dc4d21ef
parent68d6edfe1409a8f97178dd71d8c686e7999b2e0d (diff)
-proper branch order
git-svn-id: https://gnunet.org/svn/gnunet@21257 140774ce-b5e7-0310-ab8b-a85725594a96
-rw-r--r--src/util/crypto_aes.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/util/crypto_aes.c b/src/util/crypto_aes.c
index 7d14131be7..d5c36d703f 100644
--- a/src/util/crypto_aes.c
+++ b/src/util/crypto_aes.c
@@ -59,10 +59,12 @@ GNUNET_CRYPTO_aes_check_session_key (const struct GNUNET_CRYPTO_AesSessionKey
uint32_t crc;
crc = GNUNET_CRYPTO_crc32_n (key, GNUNET_CRYPTO_AES_KEY_LENGTH);
- if (ntohl (key->crc32) == crc)
- return GNUNET_OK;
- GNUNET_break_op (0);
- return GNUNET_SYSERR;
+ if (ntohl (key->crc32) != crc)
+ {
+ GNUNET_break_op (0);
+ return GNUNET_SYSERR;
+ }
+ return GNUNET_OK;
}