diff options
Diffstat (limited to 'src/core/gnunet-service-core_kx.c')
-rw-r--r-- | src/core/gnunet-service-core_kx.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/core/gnunet-service-core_kx.c b/src/core/gnunet-service-core_kx.c index 9f904742d..6c6b8f07a 100644 --- a/src/core/gnunet-service-core_kx.c +++ b/src/core/gnunet-service-core_kx.c | |||
@@ -111,12 +111,12 @@ struct EphemeralKeyMessage | |||
111 | * Ephemeral public ECC key (always for NIST P-521) encoded in a format suitable | 111 | * Ephemeral public ECC key (always for NIST P-521) encoded in a format suitable |
112 | * for network transmission as created using 'gcry_sexp_sprint'. | 112 | * for network transmission as created using 'gcry_sexp_sprint'. |
113 | */ | 113 | */ |
114 | struct GNUNET_CRYPTO_EccPublicKey ephemeral_key; | 114 | struct GNUNET_CRYPTO_EccPublicSignKey ephemeral_key; |
115 | 115 | ||
116 | /** | 116 | /** |
117 | * Public key of the signing peer (persistent version, not the ephemeral public key). | 117 | * Public key of the signing peer (persistent version, not the ephemeral public key). |
118 | */ | 118 | */ |
119 | struct GNUNET_CRYPTO_EccPublicKey origin_public_key; | 119 | struct GNUNET_CRYPTO_EccPublicSignKey origin_public_key; |
120 | 120 | ||
121 | }; | 121 | }; |
122 | 122 | ||
@@ -392,7 +392,7 @@ static struct EphemeralKeyMessage current_ekm; | |||
392 | /** | 392 | /** |
393 | * Our public key. | 393 | * Our public key. |
394 | */ | 394 | */ |
395 | static struct GNUNET_CRYPTO_EccPublicKey my_public_key; | 395 | static struct GNUNET_CRYPTO_EccPublicSignKey my_public_key; |
396 | 396 | ||
397 | /** | 397 | /** |
398 | * Our message stream tokenizer (for encrypted payload). | 398 | * Our message stream tokenizer (for encrypted payload). |
@@ -771,7 +771,7 @@ GSC_KX_handle_ephemeral_key (struct GSC_KeyExchangeInfo *kx, | |||
771 | "Core service receives `%s' request from `%4s'.\n", "EPHEMERAL_KEY", | 771 | "Core service receives `%s' request from `%4s'.\n", "EPHEMERAL_KEY", |
772 | GNUNET_i2s (&kx->peer)); | 772 | GNUNET_i2s (&kx->peer)); |
773 | GNUNET_CRYPTO_hash (&m->origin_public_key, | 773 | GNUNET_CRYPTO_hash (&m->origin_public_key, |
774 | sizeof (struct GNUNET_CRYPTO_EccPublicKey), | 774 | sizeof (struct GNUNET_CRYPTO_EccPublicSignKey), |
775 | &signer_id.hashPubKey); | 775 | &signer_id.hashPubKey); |
776 | if (0 != | 776 | if (0 != |
777 | memcmp (&signer_id, &kx->peer, | 777 | memcmp (&signer_id, &kx->peer, |
@@ -784,8 +784,8 @@ GSC_KX_handle_ephemeral_key (struct GSC_KeyExchangeInfo *kx, | |||
784 | sizeof (struct GNUNET_CRYPTO_EccSignaturePurpose) + | 784 | sizeof (struct GNUNET_CRYPTO_EccSignaturePurpose) + |
785 | sizeof (struct GNUNET_TIME_AbsoluteNBO) + | 785 | sizeof (struct GNUNET_TIME_AbsoluteNBO) + |
786 | sizeof (struct GNUNET_TIME_AbsoluteNBO) + | 786 | sizeof (struct GNUNET_TIME_AbsoluteNBO) + |
787 | sizeof (struct GNUNET_CRYPTO_EccPublicKey) + | 787 | sizeof (struct GNUNET_CRYPTO_EccPublicSignKey) + |
788 | sizeof (struct GNUNET_CRYPTO_EccPublicKey)) || | 788 | sizeof (struct GNUNET_CRYPTO_EccPublicSignKey)) || |
789 | (GNUNET_OK != | 789 | (GNUNET_OK != |
790 | GNUNET_CRYPTO_ecc_verify (GNUNET_SIGNATURE_PURPOSE_SET_ECC_KEY, | 790 | GNUNET_CRYPTO_ecc_verify (GNUNET_SIGNATURE_PURPOSE_SET_ECC_KEY, |
791 | &m->purpose, | 791 | &m->purpose, |
@@ -1477,8 +1477,8 @@ sign_ephemeral_key () | |||
1477 | current_ekm.purpose.size = htonl (sizeof (struct GNUNET_CRYPTO_EccSignaturePurpose) + | 1477 | current_ekm.purpose.size = htonl (sizeof (struct GNUNET_CRYPTO_EccSignaturePurpose) + |
1478 | sizeof (struct GNUNET_TIME_AbsoluteNBO) + | 1478 | sizeof (struct GNUNET_TIME_AbsoluteNBO) + |
1479 | sizeof (struct GNUNET_TIME_AbsoluteNBO) + | 1479 | sizeof (struct GNUNET_TIME_AbsoluteNBO) + |
1480 | sizeof (struct GNUNET_CRYPTO_EccPublicKey) + | 1480 | sizeof (struct GNUNET_CRYPTO_EccPublicSignKey) + |
1481 | sizeof (struct GNUNET_CRYPTO_EccPublicKey)); | 1481 | sizeof (struct GNUNET_CRYPTO_EccPublicSignKey)); |
1482 | current_ekm.creation_time = GNUNET_TIME_absolute_hton (GNUNET_TIME_absolute_get ()); | 1482 | current_ekm.creation_time = GNUNET_TIME_absolute_hton (GNUNET_TIME_absolute_get ()); |
1483 | if (GNUNET_YES == | 1483 | if (GNUNET_YES == |
1484 | GNUNET_CONFIGURATION_get_value_yesno (GSC_cfg, | 1484 | GNUNET_CONFIGURATION_get_value_yesno (GSC_cfg, |
@@ -1492,7 +1492,7 @@ sign_ephemeral_key () | |||
1492 | { | 1492 | { |
1493 | current_ekm.expiration_time = GNUNET_TIME_absolute_hton (GNUNET_TIME_UNIT_FOREVER_ABS); | 1493 | current_ekm.expiration_time = GNUNET_TIME_absolute_hton (GNUNET_TIME_UNIT_FOREVER_ABS); |
1494 | } | 1494 | } |
1495 | GNUNET_CRYPTO_ecc_key_get_public (my_ephemeral_key, | 1495 | GNUNET_CRYPTO_ecc_key_get_public_for_signature (my_ephemeral_key, |
1496 | ¤t_ekm.ephemeral_key); | 1496 | ¤t_ekm.ephemeral_key); |
1497 | current_ekm.origin_public_key = my_public_key; | 1497 | current_ekm.origin_public_key = my_public_key; |
1498 | GNUNET_assert (GNUNET_OK == | 1498 | GNUNET_assert (GNUNET_OK == |
@@ -1541,7 +1541,7 @@ GSC_KX_init (struct GNUNET_CRYPTO_EccPrivateKey *pk) | |||
1541 | { | 1541 | { |
1542 | GNUNET_assert (NULL != pk); | 1542 | GNUNET_assert (NULL != pk); |
1543 | my_private_key = pk; | 1543 | my_private_key = pk; |
1544 | GNUNET_CRYPTO_ecc_key_get_public (my_private_key, &my_public_key); | 1544 | GNUNET_CRYPTO_ecc_key_get_public_for_signature (my_private_key, &my_public_key); |
1545 | GNUNET_CRYPTO_hash (&my_public_key, sizeof (my_public_key), | 1545 | GNUNET_CRYPTO_hash (&my_public_key, sizeof (my_public_key), |
1546 | &GSC_my_identity.hashPubKey); | 1546 | &GSC_my_identity.hashPubKey); |
1547 | if (GNUNET_YES == | 1547 | if (GNUNET_YES == |