openssl_client_example.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /* OpenSSL client Example
  2. This example code is in the Public Domain (or CC0 licensed, at your option.)
  3. Unless required by applicable law or agreed to in writing, this
  4. software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
  5. CONDITIONS OF ANY KIND, either express or implied.
  6. */
  7. #ifndef _OPENSSL_EXAMPLE_H_
  8. #define _OPENSSL_EXAMPLE_H_
  9. /* The examples use simple WiFi configuration that you can set via
  10. 'make menuconfig'.
  11. If you'd rather not, just change the below entries to strings with
  12. the config you want - ie #define EXAMPLE_WIFI_SSID "mywifissid"
  13. */
  14. #define EXAMPLE_WIFI_SSID CONFIG_WIFI_SSID
  15. #define EXAMPLE_WIFI_PASS CONFIG_WIFI_PASSWORD
  16. /* The examples use domain of "www.baidu.com" and port number of 433 that
  17. you can set via 'make menuconfig'.
  18. If you'd rather not, just change the below entries to strings with
  19. the config you want - ie #define OPENSSL_EXAMPLE_TARGET_NAME "www.baidu.com"
  20. and ie #define OPENSSL_EXAMPLE_TARGET_TCP_PORT 433
  21. */
  22. #define OPENSSL_EXAMPLE_TARGET_NAME CONFIG_TARGET_DOMAIN
  23. #define OPENSSL_EXAMPLE_TARGET_TCP_PORT CONFIG_TARGET_PORT_NUMBER
  24. #define OPENSSL_EXAMPLE_REQUEST "{\"path\": \"/v1/ping/\", \"method\": \"GET\"}\r\n"
  25. #define OPENSSL_EXAMPLE_TASK_NAME "openssl_example"
  26. #define OPENSSL_EXAMPLE_TASK_STACK_WORDS 10240
  27. #define OPENSSL_EXAMPLE_TASK_PRORIOTY 8
  28. #define OPENSSL_EXAMPLE_RECV_BUF_LEN 1024
  29. #define OPENSSL_EXAMPLE_LOCAL_TCP_PORT 443
  30. #endif