diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-06-26 17:17:35 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-06-26 17:17:35 +0000 |
commit | abc1a0ea19b7dc199b83749d31e32622c7469ded (patch) | |
tree | 358bba92baec84a1f9bb28a6328a45390ed1d18b /src/include/gnunet_crypto_lib.h | |
parent | bb7b311515f189f38a990892ee11baffb5608ccb (diff) | |
download | gnunet-abc1a0ea19b7dc199b83749d31e32622c7469ded.tar.gz gnunet-abc1a0ea19b7dc199b83749d31e32622c7469ded.zip |
-introducing convenience function to load private key of peer
Diffstat (limited to 'src/include/gnunet_crypto_lib.h')
-rw-r--r-- | src/include/gnunet_crypto_lib.h | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/src/include/gnunet_crypto_lib.h b/src/include/gnunet_crypto_lib.h index 693cfcf12..8592f0da5 100644 --- a/src/include/gnunet_crypto_lib.h +++ b/src/include/gnunet_crypto_lib.h | |||
@@ -267,7 +267,7 @@ struct GNUNET_CRYPTO_EccSignature | |||
267 | /** | 267 | /** |
268 | * Overall size of the signature data. | 268 | * Overall size of the signature data. |
269 | */ | 269 | */ |
270 | uint16_t size; | 270 | uint16_t size GNUNET_PACKED; |
271 | 271 | ||
272 | /** | 272 | /** |
273 | * S-expression, padded with zeros. | 273 | * S-expression, padded with zeros. |
@@ -285,12 +285,12 @@ struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded | |||
285 | /** | 285 | /** |
286 | * Size of the encoding, in network byte order. | 286 | * Size of the encoding, in network byte order. |
287 | */ | 287 | */ |
288 | uint16_t size; | 288 | uint16_t size GNUNET_PACKED; |
289 | 289 | ||
290 | /** | 290 | /** |
291 | * Actual length of the q-point binary encoding. | 291 | * Actual length of the q-point binary encoding. |
292 | */ | 292 | */ |
293 | uint16_t len; | 293 | uint16_t len GNUNET_PACKED; |
294 | 294 | ||
295 | /** | 295 | /** |
296 | * 0-padded q-point in binary encoding (GCRYPT_MPI_FMT_USG). | 296 | * 0-padded q-point in binary encoding (GCRYPT_MPI_FMT_USG). |
@@ -1277,6 +1277,17 @@ GNUNET_CRYPTO_ecc_key_create_from_file (const char *filename); | |||
1277 | 1277 | ||
1278 | 1278 | ||
1279 | /** | 1279 | /** |
1280 | * Create a new private key by reading our peer's key from | ||
1281 | * the file specified in the configuration. | ||
1282 | * | ||
1283 | * @return new private key, NULL on error (for example, | ||
1284 | * permission denied) | ||
1285 | */ | ||
1286 | struct GNUNET_CRYPTO_EccPrivateKey * | ||
1287 | GNUNET_CRYPTO_ecc_key_create_from_configuration (const struct GNUNET_CONFIGURATION_Handle *cfg); | ||
1288 | |||
1289 | |||
1290 | /** | ||
1280 | * Handle to cancel private key generation and state for the | 1291 | * Handle to cancel private key generation and state for the |
1281 | * key generation operation. | 1292 | * key generation operation. |
1282 | */ | 1293 | */ |