diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-08-06 14:18:31 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-08-06 14:18:31 +0000 |
commit | fe76c075e315c0351e2fe465434ae39087daf014 (patch) | |
tree | 436887ccaf331932a3c13a8b9d2a2a710dad4be6 /src/fs/fs_uri.c | |
parent | 7eb2835d8a494c83aedb720a2ac6f6e5ba23f22f (diff) | |
download | gnunet-fe76c075e315c0351e2fe465434ae39087daf014.tar.gz gnunet-fe76c075e315c0351e2fe465434ae39087daf014.zip |
moving to new, fixed-size encoding of public and private ECC keys everywhere, also improving ECC API to better support ECRS/GADS operations
Diffstat (limited to 'src/fs/fs_uri.c')
-rw-r--r-- | src/fs/fs_uri.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/fs/fs_uri.c b/src/fs/fs_uri.c index 48c347a52..78b5459fd 100644 --- a/src/fs/fs_uri.c +++ b/src/fs/fs_uri.c | |||
@@ -117,7 +117,7 @@ GNUNET_FS_uri_to_key (const struct GNUNET_FS_Uri *uri, struct GNUNET_HashCode * | |||
117 | case GNUNET_FS_URI_LOC: | 117 | case GNUNET_FS_URI_LOC: |
118 | GNUNET_CRYPTO_hash (&uri->data.loc.fi, | 118 | GNUNET_CRYPTO_hash (&uri->data.loc.fi, |
119 | sizeof (struct FileIdentifier) + | 119 | sizeof (struct FileIdentifier) + |
120 | sizeof (struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded), | 120 | sizeof (struct GNUNET_CRYPTO_EccPublicKey), |
121 | key); | 121 | key); |
122 | break; | 122 | break; |
123 | default: | 123 | default: |
@@ -520,7 +520,7 @@ struct LocUriAssembly | |||
520 | 520 | ||
521 | struct FileIdentifier fi; | 521 | struct FileIdentifier fi; |
522 | 522 | ||
523 | struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded peer; | 523 | struct GNUNET_CRYPTO_EccPublicKey peer; |
524 | 524 | ||
525 | }; | 525 | }; |
526 | 526 | ||
@@ -591,7 +591,7 @@ uri_loc_parse (const char *s, char **emsg) | |||
591 | npos++; | 591 | npos++; |
592 | ret = | 592 | ret = |
593 | enc2bin (&s[npos], &ass.peer, | 593 | enc2bin (&s[npos], &ass.peer, |
594 | sizeof (struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded)); | 594 | sizeof (struct GNUNET_CRYPTO_EccPublicKey)); |
595 | if (ret == -1) | 595 | if (ret == -1) |
596 | { | 596 | { |
597 | *emsg = | 597 | *emsg = |
@@ -828,7 +828,7 @@ GNUNET_FS_uri_loc_get_peer_identity (const struct GNUNET_FS_Uri *uri, | |||
828 | if (uri->type != GNUNET_FS_URI_LOC) | 828 | if (uri->type != GNUNET_FS_URI_LOC) |
829 | return GNUNET_SYSERR; | 829 | return GNUNET_SYSERR; |
830 | GNUNET_CRYPTO_hash (&uri->data.loc.peer, | 830 | GNUNET_CRYPTO_hash (&uri->data.loc.peer, |
831 | sizeof (struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded), | 831 | sizeof (struct GNUNET_CRYPTO_EccPublicKey), |
832 | &peer->hashPubKey); | 832 | &peer->hashPubKey); |
833 | return GNUNET_OK; | 833 | return GNUNET_OK; |
834 | } | 834 | } |
@@ -884,7 +884,7 @@ GNUNET_FS_uri_loc_create (const struct GNUNET_FS_Uri *baseUri, | |||
884 | { | 884 | { |
885 | struct GNUNET_FS_Uri *uri; | 885 | struct GNUNET_FS_Uri *uri; |
886 | struct GNUNET_CRYPTO_EccPrivateKey *my_private_key; | 886 | struct GNUNET_CRYPTO_EccPrivateKey *my_private_key; |
887 | struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded my_public_key; | 887 | struct GNUNET_CRYPTO_EccPublicKey my_public_key; |
888 | char *keyfile; | 888 | char *keyfile; |
889 | struct LocUriAssembly ass; | 889 | struct LocUriAssembly ass; |
890 | 890 | ||
@@ -1307,7 +1307,7 @@ GNUNET_FS_uri_test_equal (const struct GNUNET_FS_Uri *u1, | |||
1307 | if (memcmp | 1307 | if (memcmp |
1308 | (&u1->data.loc, &u2->data.loc, | 1308 | (&u1->data.loc, &u2->data.loc, |
1309 | sizeof (struct FileIdentifier) + | 1309 | sizeof (struct FileIdentifier) + |
1310 | sizeof (struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded) + | 1310 | sizeof (struct GNUNET_CRYPTO_EccPublicKey) + |
1311 | sizeof (struct GNUNET_TIME_Absolute) + sizeof (unsigned short) + | 1311 | sizeof (struct GNUNET_TIME_Absolute) + sizeof (unsigned short) + |
1312 | sizeof (unsigned short)) != 0) | 1312 | sizeof (unsigned short)) != 0) |
1313 | return GNUNET_NO; | 1313 | return GNUNET_NO; |
@@ -2049,7 +2049,7 @@ uri_loc_to_string (const struct GNUNET_FS_Uri *uri) | |||
2049 | GNUNET_CRYPTO_hash_to_enc (&uri->data.loc.fi.chk.query, &queryhash); | 2049 | GNUNET_CRYPTO_hash_to_enc (&uri->data.loc.fi.chk.query, &queryhash); |
2050 | peerId = | 2050 | peerId = |
2051 | bin2enc (&uri->data.loc.peer, | 2051 | bin2enc (&uri->data.loc.peer, |
2052 | sizeof (struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded)); | 2052 | sizeof (struct GNUNET_CRYPTO_EccPublicKey)); |
2053 | peerSig = | 2053 | peerSig = |
2054 | bin2enc (&uri->data.loc.contentSignature, | 2054 | bin2enc (&uri->data.loc.contentSignature, |
2055 | sizeof (struct GNUNET_CRYPTO_EccSignature)); | 2055 | sizeof (struct GNUNET_CRYPTO_EccSignature)); |