main.c 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /* PlatformIO wolfssl_benchmark main.c
  2. *
  3. * Copyright (C) 2006-2024 wolfSSL Inc.
  4. *
  5. * This file is part of wolfSSL.
  6. *
  7. * wolfSSL is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License as published by
  9. * the Free Software Foundation; either version 2 of the License, or
  10. * (at your option) any later version.
  11. *
  12. * wolfSSL is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this program; if not, write to the Free Software
  19. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
  20. */
  21. #include "main.h"
  22. #include <wolfssl/wolfcrypt/settings.h>
  23. #ifdef WOLFSSL_ESPIDF
  24. #include <esp_log.h>
  25. #include <rtc_wdt.h>
  26. #include <wolfssl/wolfcrypt/port/Espressif/esp32-crypt.h>
  27. #endif
  28. #include <wolfssl/version.h>
  29. #include <wolfssl/wolfcrypt/types.h>
  30. #include <wolfcrypt/benchmark/benchmark.h>
  31. #define TAG "wolfSSL demo"
  32. void app_main() {
  33. int ret = 0;
  34. #ifdef WOLFSSL_ESPIDF
  35. ESP_LOGI(TAG, "Found WOLFSSL_ESPIDF!");
  36. #endif
  37. printf("\nHello World wolfSSL Version %s\n", LIBWOLFSSL_VERSION_STRING);
  38. #if defined(HAVE_VERSION_EXTENDED_INFO) && defined(WOLFSSL_ESPIDF)
  39. esp_ShowExtendedSystemInfo();
  40. #endif
  41. ret = benchmark_test(NULL);
  42. printf("\nbenchmark_test complete! result code: %d\n", ret);
  43. }