diff options
author | Martin Schanzenbach <mschanzenbach@posteo.de> | 2020-10-14 19:47:32 +0200 |
---|---|---|
committer | Martin Schanzenbach <mschanzenbach@posteo.de> | 2020-10-15 12:11:18 +0200 |
commit | 96c802b46be51e5c45f34e2de823f787d26c2929 (patch) | |
tree | 457ccfd8f9a61563af86318739c4a8f964a57025 /src/fs/gnunet-publish.c | |
parent | c14e3a2769ff0f15fdbb32797e37e43ce2344fa3 (diff) | |
download | gnunet-96c802b46be51e5c45f34e2de823f787d26c2929.tar.gz gnunet-96c802b46be51e5c45f34e2de823f787d26c2929.zip |
- towards crypto agility; wip
Diffstat (limited to 'src/fs/gnunet-publish.c')
-rw-r--r-- | src/fs/gnunet-publish.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/fs/gnunet-publish.c b/src/fs/gnunet-publish.c index 91fcd8f8a..518192283 100644 --- a/src/fs/gnunet-publish.c +++ b/src/fs/gnunet-publish.c | |||
@@ -475,6 +475,7 @@ uri_ksk_continuation (void *cls, | |||
475 | const char *emsg) | 475 | const char *emsg) |
476 | { | 476 | { |
477 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *priv; | 477 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *priv; |
478 | const struct GNUNET_IDENTITY_PrivateKey *pk; | ||
478 | 479 | ||
479 | if (NULL != emsg) | 480 | if (NULL != emsg) |
480 | { | 481 | { |
@@ -486,7 +487,10 @@ uri_ksk_continuation (void *cls, | |||
486 | GNUNET_SCHEDULER_shutdown (); | 487 | GNUNET_SCHEDULER_shutdown (); |
487 | return; | 488 | return; |
488 | } | 489 | } |
489 | priv = GNUNET_IDENTITY_ego_get_private_key (namespace); | 490 | pk = GNUNET_IDENTITY_ego_get_private_key (namespace); |
491 | if (GNUNET_IDENTITY_TYPE_ECDSA != ntohl (pk->type)) | ||
492 | return; | ||
493 | priv = &pk->ecdsa_key; | ||
490 | GNUNET_FS_publish_sks (ctx, | 494 | GNUNET_FS_publish_sks (ctx, |
491 | priv, | 495 | priv, |
492 | this_id, | 496 | this_id, |
@@ -569,6 +573,7 @@ directory_trim_complete (struct GNUNET_FS_ShareTreeItem *directory_scan_result) | |||
569 | { | 573 | { |
570 | struct GNUNET_FS_FileInformation *fi; | 574 | struct GNUNET_FS_FileInformation *fi; |
571 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *priv; | 575 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *priv; |
576 | const struct GNUNET_IDENTITY_PrivateKey *pk; | ||
572 | 577 | ||
573 | fi = get_file_information (directory_scan_result); | 578 | fi = get_file_information (directory_scan_result); |
574 | GNUNET_FS_share_tree_free (directory_scan_result); | 579 | GNUNET_FS_share_tree_free (directory_scan_result); |
@@ -589,7 +594,11 @@ directory_trim_complete (struct GNUNET_FS_ShareTreeItem *directory_scan_result) | |||
589 | if (NULL == namespace) | 594 | if (NULL == namespace) |
590 | priv = NULL; | 595 | priv = NULL; |
591 | else | 596 | else |
592 | priv = GNUNET_IDENTITY_ego_get_private_key (namespace); | 597 | { |
598 | pk = GNUNET_IDENTITY_ego_get_private_key (namespace); | ||
599 | if (GNUNET_IDENTITY_TYPE_ECDSA == ntohl (pk->type)) | ||
600 | priv = &pk->ecdsa_key; | ||
601 | } | ||
593 | pc = GNUNET_FS_publish_start (ctx, | 602 | pc = GNUNET_FS_publish_start (ctx, |
594 | fi, | 603 | fi, |
595 | priv, | 604 | priv, |