diff options
author | Julius Bünger <buenger@mytum.de> | 2019-04-26 05:56:54 +0200 |
---|---|---|
committer | Julius Bünger <buenger@mytum.de> | 2019-04-26 05:56:54 +0200 |
commit | f5f5a9f680df2cebe6435ec87650cb3cb6e3ef6e (patch) | |
tree | 94055d2c049a65b5ab6c61fd3c5867fe49f6f429 /src/reclaim | |
parent | a097690795f4f814de7cdbc97ef95fb899eeacd3 (diff) | |
download | gnunet-f5f5a9f680df2cebe6435ec87650cb3cb6e3ef6e.tar.gz gnunet-f5f5a9f680df2cebe6435ec87650cb3cb6e3ef6e.zip |
memcmp() -> GNUNET_memcmp(), first take
Diffstat (limited to 'src/reclaim')
-rw-r--r-- | src/reclaim/oidc_helper.c | 3 | ||||
-rw-r--r-- | src/reclaim/plugin_rest_openid_connect.c | 12 |
2 files changed, 5 insertions, 10 deletions
diff --git a/src/reclaim/oidc_helper.c b/src/reclaim/oidc_helper.c index 750b276a4..331bd2711 100644 --- a/src/reclaim/oidc_helper.c +++ b/src/reclaim/oidc_helper.c | |||
@@ -314,8 +314,7 @@ OIDC_parse_authz_code (const struct GNUNET_CRYPTO_EcdsaPublicKey *audience, | |||
314 | } | 314 | } |
315 | *ticket = GNUNET_new (struct GNUNET_RECLAIM_Ticket); | 315 | *ticket = GNUNET_new (struct GNUNET_RECLAIM_Ticket); |
316 | memcpy (*ticket, &purpose[1], sizeof (struct GNUNET_RECLAIM_Ticket)); | 316 | memcpy (*ticket, &purpose[1], sizeof (struct GNUNET_RECLAIM_Ticket)); |
317 | if (0 != memcmp (audience, &(*ticket)->audience, | 317 | if (0 != GNUNET_memcmp (audience, &(*ticket)->audience)) { |
318 | sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey))) { | ||
319 | GNUNET_free (purpose); | 318 | GNUNET_free (purpose); |
320 | GNUNET_free (*ticket); | 319 | GNUNET_free (*ticket); |
321 | json_decref (code_json); | 320 | json_decref (code_json); |
diff --git a/src/reclaim/plugin_rest_openid_connect.c b/src/reclaim/plugin_rest_openid_connect.c index 761c9e83d..6cf1ffdee 100644 --- a/src/reclaim/plugin_rest_openid_connect.c +++ b/src/reclaim/plugin_rest_openid_connect.c | |||
@@ -1007,8 +1007,7 @@ code_redirect (void *cls) | |||
1007 | for (handle->ego_entry = handle->ego_head; NULL != handle->ego_entry; | 1007 | for (handle->ego_entry = handle->ego_head; NULL != handle->ego_entry; |
1008 | handle->ego_entry = handle->ego_entry->next) { | 1008 | handle->ego_entry = handle->ego_entry->next) { |
1009 | GNUNET_IDENTITY_ego_get_public_key (handle->ego_entry->ego, &ego_pkey); | 1009 | GNUNET_IDENTITY_ego_get_public_key (handle->ego_entry->ego, &ego_pkey); |
1010 | if (0 == memcmp (&ego_pkey, &pubkey, | 1010 | if (0 == GNUNET_memcmp (&ego_pkey, &pubkey)) { |
1011 | sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey))) { | ||
1012 | handle->priv_key = | 1011 | handle->priv_key = |
1013 | *GNUNET_IDENTITY_ego_get_private_key (handle->ego_entry->ego); | 1012 | *GNUNET_IDENTITY_ego_get_private_key (handle->ego_entry->ego); |
1014 | handle->idp = GNUNET_RECLAIM_connect (cfg); | 1013 | handle->idp = GNUNET_RECLAIM_connect (cfg); |
@@ -1261,8 +1260,7 @@ tld_iter (void *cls, const char *section, const char *option, const char *value) | |||
1261 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Skipping non key %s\n", value); | 1260 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Skipping non key %s\n", value); |
1262 | return; | 1261 | return; |
1263 | } | 1262 | } |
1264 | if (0 == memcmp (&pkey, &handle->oidc->client_pkey, | 1263 | if (0 == GNUNET_memcmp (&pkey, &handle->oidc->client_pkey)) |
1265 | sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey))) | ||
1266 | handle->tld = GNUNET_strdup (option + 1); | 1264 | handle->tld = GNUNET_strdup (option + 1); |
1267 | } | 1265 | } |
1268 | 1266 | ||
@@ -1337,8 +1335,7 @@ authorize_endpoint (struct GNUNET_REST_RequestHandle *con_handle, | |||
1337 | for (tmp_ego = handle->ego_head; NULL != tmp_ego; tmp_ego = tmp_ego->next) { | 1335 | for (tmp_ego = handle->ego_head; NULL != tmp_ego; tmp_ego = tmp_ego->next) { |
1338 | priv_key = GNUNET_IDENTITY_ego_get_private_key (tmp_ego->ego); | 1336 | priv_key = GNUNET_IDENTITY_ego_get_private_key (tmp_ego->ego); |
1339 | GNUNET_CRYPTO_ecdsa_key_get_public (priv_key, &pkey); | 1337 | GNUNET_CRYPTO_ecdsa_key_get_public (priv_key, &pkey); |
1340 | if (0 == memcmp (&pkey, &handle->oidc->client_pkey, | 1338 | if (0 == GNUNET_memcmp (&pkey, &handle->oidc->client_pkey)) { |
1341 | sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey))) { | ||
1342 | handle->tld = GNUNET_strdup (tmp_ego->identifier); | 1339 | handle->tld = GNUNET_strdup (tmp_ego->identifier); |
1343 | handle->ego_entry = handle->ego_tail; | 1340 | handle->ego_entry = handle->ego_tail; |
1344 | } | 1341 | } |
@@ -1522,8 +1519,7 @@ ego_exists (struct RequestHandle *handle, | |||
1522 | for (ego_entry = handle->ego_head; NULL != ego_entry; | 1519 | for (ego_entry = handle->ego_head; NULL != ego_entry; |
1523 | ego_entry = ego_entry->next) { | 1520 | ego_entry = ego_entry->next) { |
1524 | GNUNET_IDENTITY_ego_get_public_key (ego_entry->ego, &pub_key); | 1521 | GNUNET_IDENTITY_ego_get_public_key (ego_entry->ego, &pub_key); |
1525 | if (0 == memcmp (&pub_key, test_key, | 1522 | if (0 == GNUNET_memcmp (&pub_key, test_key)) { |
1526 | sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey))) { | ||
1527 | break; | 1523 | break; |
1528 | } | 1524 | } |
1529 | } | 1525 | } |