diff options
author | Christian Grothoff <christian@grothoff.org> | 2020-04-08 16:56:33 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2020-04-08 16:56:33 +0200 |
commit | 11ae9f030e13d07c505a4d5477d592ddb4b3acf6 (patch) | |
tree | 69ce120a7c60c84d0d074bab8fe2cd26e77300dc /src/transport | |
parent | 2348fe4ae8ffe93765d5c56c3cc5d4490eae946d (diff) | |
download | gnunet-11ae9f030e13d07c505a4d5477d592ddb4b3acf6.tar.gz gnunet-11ae9f030e13d07c505a4d5477d592ddb4b3acf6.zip |
fix sign api for to address #6164
Diffstat (limited to 'src/transport')
-rw-r--r-- | src/transport/gnunet-communicator-tcp.c | 31 | ||||
-rw-r--r-- | src/transport/gnunet-communicator-udp.c | 16 | ||||
-rw-r--r-- | src/transport/gnunet-service-tng.c | 74 | ||||
-rw-r--r-- | src/transport/gnunet-service-transport_neighbours.c | 8 | ||||
-rw-r--r-- | src/transport/gnunet-service-transport_validation.c | 7 |
5 files changed, 70 insertions, 66 deletions
diff --git a/src/transport/gnunet-communicator-tcp.c b/src/transport/gnunet-communicator-tcp.c index 045a57d0f..2786ba184 100644 --- a/src/transport/gnunet-communicator-tcp.c +++ b/src/transport/gnunet-communicator-tcp.c | |||
@@ -880,7 +880,7 @@ do_rekey (struct Queue *queue, const struct TCPRekey *rekey) | |||
880 | /* FIXME: check monotonic time is monotonic... */ | 880 | /* FIXME: check monotonic time is monotonic... */ |
881 | if (GNUNET_OK != | 881 | if (GNUNET_OK != |
882 | GNUNET_CRYPTO_eddsa_verify (GNUNET_SIGNATURE_COMMUNICATOR_TCP_REKEY, | 882 | GNUNET_CRYPTO_eddsa_verify (GNUNET_SIGNATURE_COMMUNICATOR_TCP_REKEY, |
883 | &thp.purpose, | 883 | &thp, |
884 | &rekey->sender_sig, | 884 | &rekey->sender_sig, |
885 | &queue->target.public_key)) | 885 | &queue->target.public_key)) |
886 | { | 886 | { |
@@ -1063,8 +1063,7 @@ queue_read (void *cls) | |||
1063 | However, we have to take into account that the plaintext buffer may have | 1063 | However, we have to take into account that the plaintext buffer may have |
1064 | already contained data and not jumpt too far ahead in the ciphertext. | 1064 | already contained data and not jumpt too far ahead in the ciphertext. |
1065 | If there is no rekey and the last message is incomplete (max > total), | 1065 | If there is no rekey and the last message is incomplete (max > total), |
1066 | it is safe to keep the decryption so we shift by 'max' */ | 1066 | it is safe to keep the decryption so we shift by 'max' */if (GNUNET_YES == queue->rekeyed) |
1067 | if (GNUNET_YES == queue->rekeyed) | ||
1068 | { | 1067 | { |
1069 | max = total - old_pread_off; | 1068 | max = total - old_pread_off; |
1070 | queue->rekeyed = GNUNET_NO; | 1069 | queue->rekeyed = GNUNET_NO; |
@@ -1284,9 +1283,9 @@ inject_rekey (struct Queue *queue) | |||
1284 | thp.receiver = queue->target; | 1283 | thp.receiver = queue->target; |
1285 | thp.ephemeral = rekey.ephemeral; | 1284 | thp.ephemeral = rekey.ephemeral; |
1286 | thp.monotonic_time = rekey.monotonic_time; | 1285 | thp.monotonic_time = rekey.monotonic_time; |
1287 | GNUNET_assert (GNUNET_OK == GNUNET_CRYPTO_eddsa_sign (my_private_key, | 1286 | GNUNET_CRYPTO_eddsa_sign (my_private_key, |
1288 | &thp.purpose, | 1287 | &thp, |
1289 | &rekey.sender_sig)); | 1288 | &rekey.sender_sig); |
1290 | calculate_hmac (&queue->out_hmac, &rekey, sizeof(rekey), &rekey.hmac); | 1289 | calculate_hmac (&queue->out_hmac, &rekey, sizeof(rekey), &rekey.hmac); |
1291 | /* Encrypt rekey message with 'old' cipher */ | 1290 | /* Encrypt rekey message with 'old' cipher */ |
1292 | GNUNET_assert (0 == | 1291 | GNUNET_assert (0 == |
@@ -1586,9 +1585,9 @@ transmit_kx (struct Queue *queue, | |||
1586 | ths.receiver = queue->target; | 1585 | ths.receiver = queue->target; |
1587 | ths.ephemeral = *epub; | 1586 | ths.ephemeral = *epub; |
1588 | ths.monotonic_time = tc.monotonic_time; | 1587 | ths.monotonic_time = tc.monotonic_time; |
1589 | GNUNET_assert (GNUNET_OK == GNUNET_CRYPTO_eddsa_sign (my_private_key, | 1588 | GNUNET_CRYPTO_eddsa_sign (my_private_key, |
1590 | &ths.purpose, | 1589 | &ths, |
1591 | &tc.sender_sig)); | 1590 | &tc.sender_sig); |
1592 | GNUNET_assert (0 == | 1591 | GNUNET_assert (0 == |
1593 | gcry_cipher_encrypt (queue->out_cipher, | 1592 | gcry_cipher_encrypt (queue->out_cipher, |
1594 | &queue->cwrite_buf[queue->cwrite_off], | 1593 | &queue->cwrite_buf[queue->cwrite_off], |
@@ -1654,7 +1653,7 @@ decrypt_and_check_tc (struct Queue *queue, | |||
1654 | from this sender! */ | 1653 | from this sender! */ |
1655 | return GNUNET_CRYPTO_eddsa_verify ( | 1654 | return GNUNET_CRYPTO_eddsa_verify ( |
1656 | GNUNET_SIGNATURE_COMMUNICATOR_TCP_HANDSHAKE, | 1655 | GNUNET_SIGNATURE_COMMUNICATOR_TCP_HANDSHAKE, |
1657 | &ths.purpose, | 1656 | &ths, |
1658 | &tc->sender_sig, | 1657 | &tc->sender_sig, |
1659 | &tc->sender.public_key); | 1658 | &tc->sender.public_key); |
1660 | } | 1659 | } |
@@ -1953,7 +1952,7 @@ mq_init (void *cls, const struct GNUNET_PeerIdentity *peer, const char *address) | |||
1953 | queue->address_len = in_len; | 1952 | queue->address_len = in_len; |
1954 | queue->sock = sock; | 1953 | queue->sock = sock; |
1955 | boot_queue (queue, GNUNET_TRANSPORT_CS_OUTBOUND); | 1954 | boot_queue (queue, GNUNET_TRANSPORT_CS_OUTBOUND); |
1956 | //queue->mq_awaits_continue = GNUNET_YES; | 1955 | // queue->mq_awaits_continue = GNUNET_YES; |
1957 | queue->read_task = | 1956 | queue->read_task = |
1958 | GNUNET_SCHEDULER_add_read_net (GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT, | 1957 | GNUNET_SCHEDULER_add_read_net (GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT, |
1959 | queue->sock, | 1958 | queue->sock, |
@@ -2155,9 +2154,9 @@ run (void *cls, | |||
2155 | max_queue_length = DEFAULT_MAX_QUEUE_LENGTH; | 2154 | max_queue_length = DEFAULT_MAX_QUEUE_LENGTH; |
2156 | if (GNUNET_OK != | 2155 | if (GNUNET_OK != |
2157 | GNUNET_CONFIGURATION_get_value_time (cfg, | 2156 | GNUNET_CONFIGURATION_get_value_time (cfg, |
2158 | COMMUNICATOR_CONFIG_SECTION, | 2157 | COMMUNICATOR_CONFIG_SECTION, |
2159 | "REKEY_INTERVAL", | 2158 | "REKEY_INTERVAL", |
2160 | &rekey_interval)) | 2159 | &rekey_interval)) |
2161 | rekey_interval = DEFAULT_REKEY_INTERVAL; | 2160 | rekey_interval = DEFAULT_REKEY_INTERVAL; |
2162 | 2161 | ||
2163 | in = tcp_address_to_sockaddr (bindto, &in_len); | 2162 | in = tcp_address_to_sockaddr (bindto, &in_len); |
@@ -2286,8 +2285,8 @@ main (int argc, char *const *argv) | |||
2286 | options, | 2285 | options, |
2287 | &run, | 2286 | &run, |
2288 | NULL)) | 2287 | NULL)) |
2289 | ? 0 | 2288 | ? 0 |
2290 | : 1; | 2289 | : 1; |
2291 | GNUNET_free ((void *) argv); | 2290 | GNUNET_free ((void *) argv); |
2292 | return ret; | 2291 | return ret; |
2293 | } | 2292 | } |
diff --git a/src/transport/gnunet-communicator-udp.c b/src/transport/gnunet-communicator-udp.c index d767689b9..1542a7702 100644 --- a/src/transport/gnunet-communicator-udp.c +++ b/src/transport/gnunet-communicator-udp.c | |||
@@ -1533,7 +1533,7 @@ verify_confirmation (const struct GNUNET_CRYPTO_EcdhePublicKey *ephemeral, | |||
1533 | uhs.monotonic_time = uc->monotonic_time; | 1533 | uhs.monotonic_time = uc->monotonic_time; |
1534 | return GNUNET_CRYPTO_eddsa_verify ( | 1534 | return GNUNET_CRYPTO_eddsa_verify ( |
1535 | GNUNET_SIGNATURE_COMMUNICATOR_UDP_HANDSHAKE, | 1535 | GNUNET_SIGNATURE_COMMUNICATOR_UDP_HANDSHAKE, |
1536 | &uhs.purpose, | 1536 | &uhs, |
1537 | &uc->sender_sig, | 1537 | &uc->sender_sig, |
1538 | &uc->sender.public_key); | 1538 | &uc->sender.public_key); |
1539 | } | 1539 | } |
@@ -1634,7 +1634,7 @@ sock_read (void *cls) | |||
1634 | GNUNET_CRYPTO_hash (&sa, salen, &uhs.h_address); | 1634 | GNUNET_CRYPTO_hash (&sa, salen, &uhs.h_address); |
1635 | if (GNUNET_OK == | 1635 | if (GNUNET_OK == |
1636 | GNUNET_CRYPTO_eddsa_verify (GNUNET_SIGNATURE_COMMUNICATOR_UDP_BROADCAST, | 1636 | GNUNET_CRYPTO_eddsa_verify (GNUNET_SIGNATURE_COMMUNICATOR_UDP_BROADCAST, |
1637 | &uhs.purpose, | 1637 | &uhs, |
1638 | &ub->sender_sig, | 1638 | &ub->sender_sig, |
1639 | &ub->sender.public_key)) | 1639 | &ub->sender.public_key)) |
1640 | { | 1640 | { |
@@ -1932,9 +1932,9 @@ mq_send (struct GNUNET_MQ_Handle *mq, | |||
1932 | uhs.receiver = receiver->target; | 1932 | uhs.receiver = receiver->target; |
1933 | GNUNET_CRYPTO_ecdhe_key_get_public (&epriv, &uhs.ephemeral); | 1933 | GNUNET_CRYPTO_ecdhe_key_get_public (&epriv, &uhs.ephemeral); |
1934 | uhs.monotonic_time = uc.monotonic_time; | 1934 | uhs.monotonic_time = uc.monotonic_time; |
1935 | GNUNET_assert (GNUNET_OK == GNUNET_CRYPTO_eddsa_sign (my_private_key, | 1935 | GNUNET_CRYPTO_eddsa_sign (my_private_key, |
1936 | &uhs.purpose, | 1936 | &uhs, |
1937 | &uc.sender_sig)); | 1937 | &uc.sender_sig); |
1938 | /* Leave space for kx */ | 1938 | /* Leave space for kx */ |
1939 | dpos = sizeof(kx); | 1939 | dpos = sizeof(kx); |
1940 | /* Append encrypted uc to dgram */ | 1940 | /* Append encrypted uc to dgram */ |
@@ -2534,9 +2534,9 @@ iface_proc (void *cls, | |||
2534 | ubs.purpose.size = htonl (sizeof(ubs)); | 2534 | ubs.purpose.size = htonl (sizeof(ubs)); |
2535 | ubs.sender = my_identity; | 2535 | ubs.sender = my_identity; |
2536 | GNUNET_CRYPTO_hash (addr, addrlen, &ubs.h_address); | 2536 | GNUNET_CRYPTO_hash (addr, addrlen, &ubs.h_address); |
2537 | GNUNET_assert (GNUNET_OK == GNUNET_CRYPTO_eddsa_sign (my_private_key, | 2537 | GNUNET_CRYPTO_eddsa_sign (my_private_key, |
2538 | &ubs.purpose, | 2538 | &ubs, |
2539 | &bi->bcm.sender_sig)); | 2539 | &bi->bcm.sender_sig); |
2540 | if (NULL != broadcast_addr) | 2540 | if (NULL != broadcast_addr) |
2541 | { | 2541 | { |
2542 | bi->broadcast_task = GNUNET_SCHEDULER_add_now (&ifc_broadcast, bi); | 2542 | bi->broadcast_task = GNUNET_SCHEDULER_add_now (&ifc_broadcast, bi); |
diff --git a/src/transport/gnunet-service-tng.c b/src/transport/gnunet-service-tng.c index 8d68d90a6..75763fd9d 100644 --- a/src/transport/gnunet-service-tng.c +++ b/src/transport/gnunet-service-tng.c | |||
@@ -4137,9 +4137,9 @@ update_ephemeral (struct DistanceVector *dv) | |||
4137 | ec.purpose.size = htonl (sizeof(ec)); | 4137 | ec.purpose.size = htonl (sizeof(ec)); |
4138 | ec.target = dv->target; | 4138 | ec.target = dv->target; |
4139 | ec.ephemeral_key = dv->ephemeral_key; | 4139 | ec.ephemeral_key = dv->ephemeral_key; |
4140 | GNUNET_assert (GNUNET_OK == GNUNET_CRYPTO_eddsa_sign (GST_my_private_key, | 4140 | GNUNET_CRYPTO_eddsa_sign (GST_my_private_key, |
4141 | &ec.purpose, | 4141 | &ec, |
4142 | &dv->sender_sig)); | 4142 | &dv->sender_sig); |
4143 | } | 4143 | } |
4144 | 4144 | ||
4145 | 4145 | ||
@@ -6391,17 +6391,17 @@ forward_dv_learn (const struct GNUNET_PeerIdentity *next_hop, | |||
6391 | GNUNET_memcpy (dhops, hops, sizeof(struct DVPathEntryP) * nhops); | 6391 | GNUNET_memcpy (dhops, hops, sizeof(struct DVPathEntryP) * nhops); |
6392 | dhops[nhops].hop = GST_my_identity; | 6392 | dhops[nhops].hop = GST_my_identity; |
6393 | { | 6393 | { |
6394 | struct DvHopPS dhp = { .purpose.purpose = | 6394 | struct DvHopPS dhp = { |
6395 | htonl (GNUNET_SIGNATURE_PURPOSE_TRANSPORT_DV_HOP), | 6395 | .purpose.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_TRANSPORT_DV_HOP), |
6396 | .purpose.size = htonl (sizeof(dhp)), | 6396 | .purpose.size = htonl (sizeof(dhp)), |
6397 | .pred = dhops[nhops - 1].hop, | 6397 | .pred = dhops[nhops - 1].hop, |
6398 | .succ = *next_hop, | 6398 | .succ = *next_hop, |
6399 | .challenge = msg->challenge }; | 6399 | .challenge = msg->challenge |
6400 | }; | ||
6400 | 6401 | ||
6401 | GNUNET_assert (GNUNET_OK == | 6402 | GNUNET_CRYPTO_eddsa_sign (GST_my_private_key, |
6402 | GNUNET_CRYPTO_eddsa_sign (GST_my_private_key, | 6403 | &dhp, |
6403 | &dhp.purpose, | 6404 | &dhops[nhops].hop_sig); |
6404 | &dhops[nhops].hop_sig)); | ||
6405 | } | 6405 | } |
6406 | route_control_message_without_fc (next_hop, | 6406 | route_control_message_without_fc (next_hop, |
6407 | &fwd->header, | 6407 | &fwd->header, |
@@ -6434,7 +6434,7 @@ validate_dv_initiator_signature ( | |||
6434 | if ( | 6434 | if ( |
6435 | GNUNET_OK != | 6435 | GNUNET_OK != |
6436 | GNUNET_CRYPTO_eddsa_verify (GNUNET_SIGNATURE_PURPOSE_TRANSPORT_DV_INITIATOR, | 6436 | GNUNET_CRYPTO_eddsa_verify (GNUNET_SIGNATURE_PURPOSE_TRANSPORT_DV_INITIATOR, |
6437 | &ip.purpose, | 6437 | &ip, |
6438 | init_sig, | 6438 | init_sig, |
6439 | &init->public_key)) | 6439 | &init->public_key)) |
6440 | { | 6440 | { |
@@ -6770,7 +6770,7 @@ handle_dv_learn (void *cls, const struct TransportDVLearnMessage *dvl) | |||
6770 | 6770 | ||
6771 | if (GNUNET_OK != | 6771 | if (GNUNET_OK != |
6772 | GNUNET_CRYPTO_eddsa_verify (GNUNET_SIGNATURE_PURPOSE_TRANSPORT_DV_HOP, | 6772 | GNUNET_CRYPTO_eddsa_verify (GNUNET_SIGNATURE_PURPOSE_TRANSPORT_DV_HOP, |
6773 | &dhp.purpose, | 6773 | &dhp, |
6774 | &hops[i].hop_sig, | 6774 | &hops[i].hop_sig, |
6775 | &hops[i].hop.public_key)) | 6775 | &hops[i].hop.public_key)) |
6776 | { | 6776 | { |
@@ -7422,7 +7422,7 @@ handle_dv_box (void *cls, const struct TransportDVBoxMessage *dvb) | |||
7422 | GNUNET_OK != | 7422 | GNUNET_OK != |
7423 | GNUNET_CRYPTO_eddsa_verify ( | 7423 | GNUNET_CRYPTO_eddsa_verify ( |
7424 | GNUNET_SIGNATURE_PURPOSE_TRANSPORT_EPHEMERAL, | 7424 | GNUNET_SIGNATURE_PURPOSE_TRANSPORT_EPHEMERAL, |
7425 | &ec.purpose, | 7425 | &ec, |
7426 | &ppay.sender_sig, | 7426 | &ppay.sender_sig, |
7427 | &ppay.sender.public_key)) | 7427 | &ppay.sender.public_key)) |
7428 | { | 7428 | { |
@@ -7728,15 +7728,16 @@ handle_validation_challenge ( | |||
7728 | tvr.validity_duration = validity_duration; | 7728 | tvr.validity_duration = validity_duration; |
7729 | { | 7729 | { |
7730 | /* create signature */ | 7730 | /* create signature */ |
7731 | struct TransportValidationPS tvp = | 7731 | struct TransportValidationPS tvp = { |
7732 | { .purpose.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_TRANSPORT_CHALLENGE), | 7732 | .purpose.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_TRANSPORT_CHALLENGE), |
7733 | .purpose.size = htonl (sizeof(tvp)), | 7733 | .purpose.size = htonl (sizeof(tvp)), |
7734 | .validity_duration = validity_duration, | 7734 | .validity_duration = validity_duration, |
7735 | .challenge = tvc->challenge }; | 7735 | .challenge = tvc->challenge |
7736 | }; | ||
7736 | 7737 | ||
7737 | GNUNET_assert (GNUNET_OK == GNUNET_CRYPTO_eddsa_sign (GST_my_private_key, | 7738 | GNUNET_CRYPTO_eddsa_sign (GST_my_private_key, |
7738 | &tvp.purpose, | 7739 | &tvp, |
7739 | &tvr.signature)); | 7740 | &tvr.signature); |
7740 | } | 7741 | } |
7741 | route_control_message_without_fc (&cmc->im.sender, | 7742 | route_control_message_without_fc (&cmc->im.sender, |
7742 | &tvr.header, | 7743 | &tvr.header, |
@@ -7921,16 +7922,17 @@ handle_validation_response ( | |||
7921 | 7922 | ||
7922 | { | 7923 | { |
7923 | /* check signature */ | 7924 | /* check signature */ |
7924 | struct TransportValidationPS tvp = | 7925 | struct TransportValidationPS tvp = { |
7925 | { .purpose.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_TRANSPORT_CHALLENGE), | 7926 | .purpose.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_TRANSPORT_CHALLENGE), |
7926 | .purpose.size = htonl (sizeof(tvp)), | 7927 | .purpose.size = htonl (sizeof(tvp)), |
7927 | .validity_duration = tvr->validity_duration, | 7928 | .validity_duration = tvr->validity_duration, |
7928 | .challenge = tvr->challenge }; | 7929 | .challenge = tvr->challenge |
7930 | }; | ||
7929 | 7931 | ||
7930 | if ( | 7932 | if ( |
7931 | GNUNET_OK != | 7933 | GNUNET_OK != |
7932 | GNUNET_CRYPTO_eddsa_verify (GNUNET_SIGNATURE_PURPOSE_TRANSPORT_CHALLENGE, | 7934 | GNUNET_CRYPTO_eddsa_verify (GNUNET_SIGNATURE_PURPOSE_TRANSPORT_CHALLENGE, |
7933 | &tvp.purpose, | 7935 | &tvp, |
7934 | &tvr->signature, | 7936 | &tvr->signature, |
7935 | &cmc->im.sender.public_key)) | 7937 | &cmc->im.sender.public_key)) |
7936 | { | 7938 | { |
@@ -9393,15 +9395,17 @@ start_dv_learn (void *cls) | |||
9393 | dvl.monotonic_time = | 9395 | dvl.monotonic_time = |
9394 | GNUNET_TIME_absolute_hton (GNUNET_TIME_absolute_get_monotonic (GST_cfg)); | 9396 | GNUNET_TIME_absolute_hton (GNUNET_TIME_absolute_get_monotonic (GST_cfg)); |
9395 | { | 9397 | { |
9396 | struct DvInitPS dvip = { .purpose.purpose = htonl ( | 9398 | struct DvInitPS dvip = { |
9397 | GNUNET_SIGNATURE_PURPOSE_TRANSPORT_DV_INITIATOR), | 9399 | .purpose.purpose = htonl ( |
9398 | .purpose.size = htonl (sizeof(dvip)), | 9400 | GNUNET_SIGNATURE_PURPOSE_TRANSPORT_DV_INITIATOR), |
9399 | .monotonic_time = dvl.monotonic_time, | 9401 | .purpose.size = htonl (sizeof(dvip)), |
9400 | .challenge = lle->challenge }; | 9402 | .monotonic_time = dvl.monotonic_time, |
9401 | 9403 | .challenge = lle->challenge | |
9402 | GNUNET_assert (GNUNET_OK == GNUNET_CRYPTO_eddsa_sign (GST_my_private_key, | 9404 | }; |
9403 | &dvip.purpose, | 9405 | |
9404 | &dvl.init_sig)); | 9406 | GNUNET_CRYPTO_eddsa_sign (GST_my_private_key, |
9407 | &dvip, | ||
9408 | &dvl.init_sig); | ||
9405 | } | 9409 | } |
9406 | dvl.initiator = GST_my_identity; | 9410 | dvl.initiator = GST_my_identity; |
9407 | dvl.challenge = lle->challenge; | 9411 | dvl.challenge = lle->challenge; |
diff --git a/src/transport/gnunet-service-transport_neighbours.c b/src/transport/gnunet-service-transport_neighbours.c index 9c6cebc24..ec64ca607 100644 --- a/src/transport/gnunet-service-transport_neighbours.c +++ b/src/transport/gnunet-service-transport_neighbours.c | |||
@@ -1045,9 +1045,9 @@ send_disconnect (struct NeighbourMapEntry *n) | |||
1045 | GNUNET_TIME_absolute_hton (GNUNET_TIME_absolute_get ()); | 1045 | GNUNET_TIME_absolute_hton (GNUNET_TIME_absolute_get ()); |
1046 | disconnect_msg.public_key = GST_my_identity.public_key; | 1046 | disconnect_msg.public_key = GST_my_identity.public_key; |
1047 | GNUNET_assert (GNUNET_OK == | 1047 | GNUNET_assert (GNUNET_OK == |
1048 | GNUNET_CRYPTO_eddsa_sign (GST_my_private_key, | 1048 | GNUNET_CRYPTO_eddsa_sign_ (GST_my_private_key, |
1049 | &disconnect_msg.purpose, | 1049 | &disconnect_msg.purpose, |
1050 | &disconnect_msg.signature)); | 1050 | &disconnect_msg.signature)); |
1051 | 1051 | ||
1052 | (void) send_with_session (n, | 1052 | (void) send_with_session (n, |
1053 | &disconnect_msg, | 1053 | &disconnect_msg, |
@@ -3763,7 +3763,7 @@ GST_neighbours_handle_disconnect_message (const struct | |||
3763 | return; | 3763 | return; |
3764 | } | 3764 | } |
3765 | if (GNUNET_OK != | 3765 | if (GNUNET_OK != |
3766 | GNUNET_CRYPTO_eddsa_verify ( | 3766 | GNUNET_CRYPTO_eddsa_verify_ ( |
3767 | GNUNET_MESSAGE_TYPE_TRANSPORT_SESSION_DISCONNECT, | 3767 | GNUNET_MESSAGE_TYPE_TRANSPORT_SESSION_DISCONNECT, |
3768 | &sdm->purpose, | 3768 | &sdm->purpose, |
3769 | &sdm->signature, | 3769 | &sdm->signature, |
diff --git a/src/transport/gnunet-service-transport_validation.c b/src/transport/gnunet-service-transport_validation.c index 631b0a8f8..610c45a21 100644 --- a/src/transport/gnunet-service-transport_validation.c +++ b/src/transport/gnunet-service-transport_validation.c | |||
@@ -1271,8 +1271,9 @@ GST_validation_handle_ping (const struct GNUNET_PeerIdentity *sender, | |||
1271 | *sig_cache_exp = GNUNET_TIME_relative_to_absolute (PONG_SIGNATURE_LIFETIME); | 1271 | *sig_cache_exp = GNUNET_TIME_relative_to_absolute (PONG_SIGNATURE_LIFETIME); |
1272 | pong->expiration = GNUNET_TIME_absolute_hton (*sig_cache_exp); | 1272 | pong->expiration = GNUNET_TIME_absolute_hton (*sig_cache_exp); |
1273 | if (GNUNET_OK != | 1273 | if (GNUNET_OK != |
1274 | GNUNET_CRYPTO_eddsa_sign (GST_my_private_key, &pong->purpose, | 1274 | GNUNET_CRYPTO_eddsa_sign_ (GST_my_private_key, |
1275 | sig_cache)) | 1275 | &pong->purpose, |
1276 | sig_cache)) | ||
1276 | { | 1277 | { |
1277 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 1278 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
1278 | _ ("Failed to create PONG signature for peer `%s'\n"), | 1279 | _ ("Failed to create PONG signature for peer `%s'\n"), |
@@ -1559,7 +1560,7 @@ GST_validation_handle_pong (const struct GNUNET_PeerIdentity *sender, | |||
1559 | if (GNUNET_YES == do_verify) | 1560 | if (GNUNET_YES == do_verify) |
1560 | { | 1561 | { |
1561 | /* Do expensive verification */ | 1562 | /* Do expensive verification */ |
1562 | sig_res = GNUNET_CRYPTO_eddsa_verify ( | 1563 | sig_res = GNUNET_CRYPTO_eddsa_verify_ ( |
1563 | GNUNET_SIGNATURE_PURPOSE_TRANSPORT_PONG_OWN, | 1564 | GNUNET_SIGNATURE_PURPOSE_TRANSPORT_PONG_OWN, |
1564 | &pong->purpose, | 1565 | &pong->purpose, |
1565 | &pong->signature, | 1566 | &pong->signature, |