diff options
author | TheJackiMonster <thejackimonster@gmail.com> | 2020-11-07 16:06:11 +0100 |
---|---|---|
committer | TheJackiMonster <thejackimonster@gmail.com> | 2020-11-07 16:06:11 +0100 |
commit | c517aefd0325f6113008a6eb834c6dfe5156cb65 (patch) | |
tree | c984172f2a88a76cc6c82d969286ea5bcdb8dfed | |
parent | 4d10374ff7762d64c387b70edf9f31397eab4123 (diff) | |
download | gnunet-c517aefd0325f6113008a6eb834c6dfe5156cb65.tar.gz gnunet-c517aefd0325f6113008a6eb834c6dfe5156cb65.zip |
formatting my identity api code
Signed-off-by: TheJackiMonster <thejackimonster@gmail.com>
-rw-r--r-- | src/identity/identity_api.c | 18 |
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, | |||
1135 | switch (ntohl (pub->type)) | 1135 | switch (ntohl (pub->type)) |
1136 | { | 1136 | { |
1137 | case GNUNET_IDENTITY_TYPE_ECDSA: | 1137 | case GNUNET_IDENTITY_TYPE_ECDSA: |
1138 | if (GNUNET_CRYPTO_ecdh_ecdsa(&pk, &(pub->ecdsa_key), &hash) == GNUNET_SYSERR) | 1138 | if (GNUNET_SYSERR == GNUNET_CRYPTO_ecdh_ecdsa(&pk, &(pub->ecdsa_key), &hash)) |
1139 | return -1; | 1139 | return -1; |
1140 | break; | 1140 | break; |
1141 | case GNUNET_IDENTITY_TYPE_EDDSA: | 1141 | case GNUNET_IDENTITY_TYPE_EDDSA: |
1142 | if (GNUNET_CRYPTO_ecdh_eddsa(&pk, &(pub->eddsa_key), &hash) == GNUNET_SYSERR) | 1142 | if (GNUNET_SYSERR == GNUNET_CRYPTO_ecdh_eddsa(&pk, &(pub->eddsa_key), &hash)) |
1143 | return -1; | 1143 | return -1; |
1144 | break; | 1144 | break; |
1145 | default: | 1145 | default: |
@@ -1168,15 +1168,15 @@ GNUNET_IDENTITY_private_key_decrypt(const void *block, | |||
1168 | switch (ntohl (priv->type)) | 1168 | switch (ntohl (priv->type)) |
1169 | { | 1169 | { |
1170 | case GNUNET_IDENTITY_TYPE_ECDSA: | 1170 | case GNUNET_IDENTITY_TYPE_ECDSA: |
1171 | if (GNUNET_CRYPTO_ecdsa_ecdh(&(priv->ecdsa_key), ecc, &hash) == GNUNET_SYSERR) | 1171 | if (GNUNET_SYSERR == GNUNET_CRYPTO_ecdsa_ecdh(&(priv->ecdsa_key), ecc, &hash)) |
1172 | return -1; | 1172 | return -1; |
1173 | break; | 1173 | break; |
1174 | case GNUNET_IDENTITY_TYPE_EDDSA: | 1174 | case GNUNET_IDENTITY_TYPE_EDDSA: |
1175 | if (GNUNET_CRYPTO_eddsa_ecdh(&(priv->eddsa_key), ecc, &hash) == GNUNET_SYSERR) | 1175 | if (GNUNET_SYSERR == GNUNET_CRYPTO_eddsa_ecdh(&(priv->eddsa_key), ecc, &hash)) |
1176 | return -1; | 1176 | return -1; |
1177 | break; | 1177 | break; |
1178 | default: | 1178 | default: |
1179 | return -1; | 1179 | return -1; |
1180 | } | 1180 | } |
1181 | struct GNUNET_CRYPTO_SymmetricSessionKey key; | 1181 | struct GNUNET_CRYPTO_SymmetricSessionKey key; |
1182 | struct GNUNET_CRYPTO_SymmetricInitializationVector iv; | 1182 | struct GNUNET_CRYPTO_SymmetricInitializationVector iv; |