summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheJackiMonster <thejackimonster@gmail.com>2020-11-07 16:06:11 +0100
committerTheJackiMonster <thejackimonster@gmail.com>2020-11-07 16:06:11 +0100
commitc517aefd0325f6113008a6eb834c6dfe5156cb65 (patch)
treec984172f2a88a76cc6c82d969286ea5bcdb8dfed
parent4d10374ff7762d64c387b70edf9f31397eab4123 (diff)
formatting my identity api code
Signed-off-by: TheJackiMonster <thejackimonster@gmail.com>
-rw-r--r--src/identity/identity_api.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/identity/identity_api.c b/src/identity/identity_api.c
index 45c18b95c..6f7c5d860 100644
--- a/src/identity/identity_api.c
+++ b/src/identity/identity_api.c
@@ -1135,11 +1135,11 @@ GNUNET_IDENTITY_public_key_encrypt(const void *block,
switch (ntohl (pub->type))
{
case GNUNET_IDENTITY_TYPE_ECDSA:
- if (GNUNET_CRYPTO_ecdh_ecdsa(&pk, &(pub->ecdsa_key), &hash) == GNUNET_SYSERR)
+ if (GNUNET_SYSERR == GNUNET_CRYPTO_ecdh_ecdsa(&pk, &(pub->ecdsa_key), &hash))
return -1;
break;
case GNUNET_IDENTITY_TYPE_EDDSA:
- if (GNUNET_CRYPTO_ecdh_eddsa(&pk, &(pub->eddsa_key), &hash) == GNUNET_SYSERR)
+ if (GNUNET_SYSERR == GNUNET_CRYPTO_ecdh_eddsa(&pk, &(pub->eddsa_key), &hash))
return -1;
break;
default:
@@ -1168,15 +1168,15 @@ GNUNET_IDENTITY_private_key_decrypt(const void *block,
switch (ntohl (priv->type))
{
case GNUNET_IDENTITY_TYPE_ECDSA:
- if (GNUNET_CRYPTO_ecdsa_ecdh(&(priv->ecdsa_key), ecc, &hash) == GNUNET_SYSERR)
- return -1;
- break;
+ if (GNUNET_SYSERR == GNUNET_CRYPTO_ecdsa_ecdh(&(priv->ecdsa_key), ecc, &hash))
+ return -1;
+ break;
case GNUNET_IDENTITY_TYPE_EDDSA:
- if (GNUNET_CRYPTO_eddsa_ecdh(&(priv->eddsa_key), ecc, &hash) == GNUNET_SYSERR)
- return -1;
- break;
+ if (GNUNET_SYSERR == GNUNET_CRYPTO_eddsa_ecdh(&(priv->eddsa_key), ecc, &hash))
+ return -1;
+ break;
default:
- return -1;
+ return -1;
}
struct GNUNET_CRYPTO_SymmetricSessionKey key;
struct GNUNET_CRYPTO_SymmetricInitializationVector iv;