You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

68 lines
1.7 KiB

  1. /*
  2. * This file is part of GNUnet
  3. * Copyright (C) 2013 GNUnet e.V.
  4. *
  5. * GNUnet is free software: you can redistribute it and/or modify it
  6. * under the terms of the GNU Affero General Public License as published
  7. * by the Free Software Foundation, either version 3 of the License,
  8. * or (at your option) any later version.
  9. *
  10. * GNUnet is distributed in the hope that it will be useful, but
  11. * WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  13. * Affero General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU Affero General Public License
  16. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  17. SPDX-License-Identifier: AGPL3.0-or-later
  18. */
  19. /**
  20. * @file psyc/test_psyc_api_join.c
  21. * @brief library for writing psyc tests
  22. * @author xrs
  23. */
  24. #define MAX_TESTBED_OPS 32
  25. struct pctx
  26. {
  27. int idx;
  28. struct GNUNET_TESTBED_Peer *testbed_peer;
  29. const struct GNUNET_PeerIdentity *peer_id;
  30. const struct GNUNET_PeerIdentity *peer_id_master;
  31. /**
  32. * Used to simulate egos (not peerid)
  33. */
  34. const struct GNUNET_CRYPTO_EcdsaPrivateKey *id_key;
  35. const struct GNUNET_CRYPTO_EcdsaPublicKey *id_pub_key;
  36. /**
  37. * Used to store either GNUNET_PSYC_Master or GNUNET_PSYC_Slave handle
  38. */
  39. void *psyc;
  40. struct GNUNET_PSYC_Channel *channel;
  41. const struct GNUNET_CRYPTO_EddsaPrivateKey *channel_key;
  42. struct GNUNET_CRYPTO_EddsaPublicKey *channel_pub_key;
  43. int test_ok;
  44. };
  45. static struct GNUNET_SCHEDULER_Task *timeout_task_id;
  46. static int result = GNUNET_SYSERR;
  47. static struct GNUNET_TESTBED_Operation *op[MAX_TESTBED_OPS];
  48. static int op_cnt = 0;