diff options
Diffstat (limited to 'src/identity/identity_api.c')
-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; |