mirror of https://github.com/wolfSSL/wolfssh.git
Espressif Managed Component wolfSSH 1.4.18 post-release update
parent
c5006cfcda
commit
23972128ed
|
@ -14,6 +14,8 @@ jobs:
|
|||
config:
|
||||
- zephyr-ref: v3.4.0
|
||||
zephyr-sdk: 0.16.1
|
||||
|
||||
if: github.repository_owner == 'wolfssl'
|
||||
runs-on: ubuntu-latest
|
||||
# This should be a safe limit for the tests to run.
|
||||
timeout-minutes: 20
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
# You should have received a copy of the GNU General Public License
|
||||
# along with wolfSSH. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# cmake for WOLFSSH Espressif projects
|
||||
# cmake for WOLFSSH Espressif projects (echoserver)
|
||||
#
|
||||
# See https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/build-system.html
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
# You should have received a copy of the GNU General Public License
|
||||
# along with wolfSSH. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# cmake for WOLFSSH Espressif projects v5.6.6 r1
|
||||
# cmake for WOLFSSH Espressif projects v5.7.6 (template pr)
|
||||
#
|
||||
# See https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/build-system.html
|
||||
#
|
||||
|
|
|
@ -26,7 +26,12 @@
|
|||
#include <esp_log.h>
|
||||
|
||||
/* wolfSSL */
|
||||
#include "user_settings.h" /* always include wolfSSL user_settings.h first */
|
||||
#include <wolfssl/wolfcrypt/settings.h> /* includes wolfSSL user-settings.h */
|
||||
#include <wolfssl/wolfcrypt/port/Espressif/esp32-crypt.h>
|
||||
#ifndef WOLFSSL_ESPIDF
|
||||
#warning "Problem with wolfSSL user_settings."
|
||||
#warning "Check components/wolfssl/include"
|
||||
#endif
|
||||
#include <wolfssl/wolfcrypt/port/Espressif/esp32-crypt.h>
|
||||
#include <wolfssl/version.h>
|
||||
|
||||
|
|
|
@ -30,21 +30,23 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <esp_err.h>
|
||||
|
||||
/* a function to show the current data and time */
|
||||
int esp_show_current_datetime();
|
||||
esp_err_t esp_show_current_datetime();
|
||||
|
||||
/* worst case, if GitHub time not available, used fixed time */
|
||||
int set_fixed_default_time(void);
|
||||
esp_err_t set_fixed_default_time(void);
|
||||
|
||||
/* set time from string (e.g. GitHub commit time) */
|
||||
int set_time_from_string(char* time_buffer);
|
||||
esp_err_t set_time_from_string(const char* time_buffer);
|
||||
|
||||
/* set time from NTP servers,
|
||||
* also initially calls set_fixed_default_time or set_time_from_string */
|
||||
int set_time(void);
|
||||
esp_err_t set_time(void);
|
||||
|
||||
/* wait NTP_RETRY_COUNT seconds before giving up on NTP time */
|
||||
int set_time_wait_for_ntp(void);
|
||||
esp_err_t set_time_wait_for_ntp(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
|
|
|
@ -46,7 +46,7 @@ static const char* const TAG = "My Project";
|
|||
void app_main(void)
|
||||
{
|
||||
func_args args = {0};
|
||||
int ret = ESP_OK;
|
||||
esp_err_t ret = ESP_OK;
|
||||
|
||||
ESP_LOGI(TAG, "------------ wolfSSL wolfSSH template Example ----------");
|
||||
ESP_LOGI(TAG, "--------------------------------------------------------");
|
||||
|
|
|
@ -91,7 +91,7 @@ char* ntpServerList[NTP_SERVER_COUNT] = NTP_SERVER_LIST;
|
|||
extern char* ntpServerList[NTP_SERVER_COUNT];
|
||||
|
||||
/* Show the current date and time */
|
||||
int esp_show_current_datetime()
|
||||
esp_err_t esp_show_current_datetime()
|
||||
{
|
||||
time_t now;
|
||||
char strftime_buf[64];
|
||||
|
@ -108,7 +108,7 @@ int esp_show_current_datetime()
|
|||
}
|
||||
|
||||
/* the worst-case scenario is a hard-coded date/time */
|
||||
int set_fixed_default_time(void)
|
||||
esp_err_t set_fixed_default_time(void)
|
||||
{
|
||||
/* ideally, we'd like to set time from network,
|
||||
* but let's set a default time, just in case */
|
||||
|
@ -138,7 +138,7 @@ int set_fixed_default_time(void)
|
|||
*
|
||||
* returns 0 = success if able to set the time from the provided string
|
||||
* error for any other value, typically -1 */
|
||||
int set_time_from_string(char* time_buffer)
|
||||
esp_err_t set_time_from_string(const char* time_buffer)
|
||||
{
|
||||
/* expecting github default formatting: 'Thu Aug 31 12:41:45 2023 -0700' */
|
||||
const char *format = "%3s %3s %d %d:%d:%d %d %s";
|
||||
|
@ -222,7 +222,7 @@ int set_time_from_string(char* time_buffer)
|
|||
}
|
||||
|
||||
/* set time; returns 0 if succecssfully configured with NTP */
|
||||
int set_time(void)
|
||||
esp_err_t set_time(void)
|
||||
{
|
||||
#ifndef NTP_SERVER_COUNT
|
||||
ESP_LOGW(TAG, "Warning: no sntp server names defined. "
|
||||
|
@ -319,7 +319,7 @@ int set_time(void)
|
|||
}
|
||||
|
||||
/* wait for NTP to actually set the time */
|
||||
int set_time_wait_for_ntp(void)
|
||||
esp_err_t set_time_wait_for_ntp(void)
|
||||
{
|
||||
int ret = 0;
|
||||
#ifdef HAS_ESP_NETIF_SNTP
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
# You should have received a copy of the GNU General Public License
|
||||
# along with wolfSSH. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# cmake for WOLFSSH Espressif projects v5.6.6 r1
|
||||
# cmake for wolfssh Espressif projects v5.7.6 (template pr)
|
||||
#
|
||||
# See https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/build-system.html
|
||||
#
|
||||
|
@ -317,27 +317,27 @@ else()
|
|||
message(STATUS "************************************************************************************************")
|
||||
FIND_WOLFSSH_DIRECTORY(WOLFSSH_ROOT)
|
||||
|
||||
# Check to see if we're already in WOLFSSH, and only if WOLFSSH_ROOT not specified
|
||||
# Check to see if we're already in wolfssh, and only if WOLFSSH_ROOT not specified
|
||||
if ("${WOLFSSH_ROOT}" STREQUAL "")
|
||||
# WOLFSSH examples are 7 directories deep from WOLFSSH repo root
|
||||
# wolfssh examples are 7 directories deep from wolfssh repo root
|
||||
# 1 2 3 4 5 6 7
|
||||
set(THIS_RELATIVE_PATH "../../../../../../..")
|
||||
get_filename_component(THIS_SEARCH_PATH "${THIS_RELATIVE_PATH}" ABSOLUTE)
|
||||
message(STATUS "Searching in path = ${THIS_SEARCH_PATH}")
|
||||
|
||||
if (EXISTS "${THIS_SEARCH_PATH}/wolfcrypt/src")
|
||||
# we're already in WOLFSSH examples!
|
||||
# we're already in wolfssh examples!
|
||||
get_filename_component(WOLFSSH_ROOT "${THIS_SEARCH_PATH}" ABSOLUTE)
|
||||
message(STATUS "Using WOLFSSH example with root ${WOLFSSH_ROOT}")
|
||||
message(STATUS "Using wolfssh example with root ${WOLFSSH_ROOT}")
|
||||
else()
|
||||
# We're in some other repo such as wolfssh, so we'll search for an
|
||||
# adjacent-level directory for WOLFSSH. (8 directories up, then down one)
|
||||
# adjacent-level directory for wolfssh. (8 directories up, then down one)
|
||||
#
|
||||
# For example WOLFSSH examples:
|
||||
# C:\workspace\WOLFSSH-gojimmypi\IDE\Espressif\ESP-IDF\examples\WOLFSSH_benchmark\components\WOLFSSH
|
||||
# For example wolfssh examples:
|
||||
# C:\workspace\wolfssh-gojimmypi\IDE\Espressif\ESP-IDF\examples\wolfssh_benchmark\components\wolfssh
|
||||
#
|
||||
# For example wolfSSH examples:
|
||||
# C:\workspace\wolfssh-gojimmypi\ide\Espressif\ESP-IDF\examples\wolfssh_benchmark\components\WOLFSSH
|
||||
# C:\workspace\wolfssh-gojimmypi\ide\Espressif\ESP-IDF\examples\wolfssh_benchmark\components\wolfssh
|
||||
#
|
||||
# 1 2 3 4 5 6 7 8
|
||||
set(THIS_RELATIVE_PATH "../../../../../../../..")
|
||||
|
@ -356,7 +356,7 @@ else()
|
|||
get_filename_component(THIS_DIR "${CMAKE_CURRENT_SOURCE_DIR}" ABSOLUTE)
|
||||
message(STATUS "THIS_DIR = ${THIS_DIR}")
|
||||
|
||||
# find the user name to search for possible "WOLFSSH-username"
|
||||
# find the user name to search for possible "wolfssh-username"
|
||||
message(STATUS "USERNAME = $ENV{USERNAME}")
|
||||
if( "$ENV{USER}" STREQUAL "" ) # the bash user
|
||||
if( "$ENV{USERNAME}" STREQUAL "" ) # the Windows user
|
||||
|
@ -371,35 +371,35 @@ else()
|
|||
endif()
|
||||
message(STATUS "THIS_USER = ${THIS_USER}")
|
||||
|
||||
# This same makefile is used for both the WOLFSSH component, and other
|
||||
# components that may depend on WOLFSSH, such as wolfssh. Therefore
|
||||
# we need to determine if this makefile is in the WOLFSSH repo, or
|
||||
# This same makefile is used for both the wolfssh component, and other
|
||||
# components that may depend on wolfssh, such as wolfssh. Therefore
|
||||
# we need to determine if this makefile is in the wolfssh repo, or
|
||||
# some other repo.
|
||||
|
||||
if( "{THIS_USER}" STREQUAL "" )
|
||||
# This is highly unusual to not find a user name.
|
||||
# In this case, we'll just search for a "WOLFSSH" directory:
|
||||
# In this case, we'll just search for a "wolfssh" directory:
|
||||
message(STATUS "No username found!")
|
||||
get_filename_component(WOLFSSH_ROOT "${THIS_RELATIVE_PATH}/WOLFSSH" ABSOLUTE)
|
||||
get_filename_component(WOLFSSH_ROOT "${THIS_RELATIVE_PATH}/wolfssh" ABSOLUTE)
|
||||
else()
|
||||
# We found an environment USER name!
|
||||
# The first place to look for WOLFSSH will be in a user-clone called "WOLFSSH-[username]"
|
||||
message(STATUS "Using [THIS_USER = ${THIS_USER}] to see if there's a [relative path]/WOLFSSH-${THIS_USER} directory.")
|
||||
get_filename_component(WOLFSSH_ROOT "${THIS_RELATIVE_PATH}/WOLFSSH-${THIS_USER}" ABSOLUTE)
|
||||
# The first place to look for wolfssh will be in a user-clone called "wolfssh-[username]"
|
||||
message(STATUS "Using [THIS_USER = ${THIS_USER}] to see if there's a [relative path]/wolfssh-${THIS_USER} directory.")
|
||||
get_filename_component(WOLFSSH_ROOT "${THIS_RELATIVE_PATH}/wolfssh-${THIS_USER}" ABSOLUTE)
|
||||
|
||||
if( EXISTS "${WOLFSSH_ROOT}" )
|
||||
message(STATUS "Found WOLFSSH in user-suffix ${WOLFSSH_ROOT}")
|
||||
message(STATUS "Found wolfssh in user-suffix ${WOLFSSH_ROOT}")
|
||||
else()
|
||||
# If there's not a user-clone called "WOLFSSH-[username]",
|
||||
# perhaps there's simply a git clone called "WOLFSSH"?
|
||||
message(STATUS "Did not find WOLFSSH-${THIS_USER}; continuing search...")
|
||||
get_filename_component(WOLFSSH_ROOT "${THIS_RELATIVE_PATH}/WOLFSSH" ABSOLUTE)
|
||||
# If there's not a user-clone called "wolfssh-[username]",
|
||||
# perhaps there's simply a git clone called "wolfssh"?
|
||||
message(STATUS "Did not find wolfssh-${THIS_USER}; continuing search...")
|
||||
get_filename_component(WOLFSSH_ROOT "${THIS_RELATIVE_PATH}/wolfssh" ABSOLUTE)
|
||||
|
||||
if( EXISTS "${WOLFSSH_ROOT}" )
|
||||
message(STATUS "Found WOLFSSH in standard ${WOLFSSH_ROOT}")
|
||||
message(STATUS "Found wolfssh in standard ${WOLFSSH_ROOT}")
|
||||
else()
|
||||
# Things are looking pretty bleak. We'll likely not be able to compile.
|
||||
message(STATUS "Did not find WOLFSSH in ${WOLFSSH_ROOT}")
|
||||
message(STATUS "Did not find wolfssh in ${WOLFSSH_ROOT}")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
@ -426,8 +426,8 @@ else()
|
|||
if( EXISTS "${WOLFSSH_ROOT}" )
|
||||
message(STATUS "WOLFSSH_ROOT = ${WOLFSSH_ROOT}")
|
||||
else()
|
||||
# Abort. We need WOLFSSH _somewhere_.
|
||||
message(FATAL_ERROR "Could not find WOLFSSH in ${WOLFSSH_ROOT}. Try setting environment variable or git clone.")
|
||||
# Abort. We need wolfssh _somewhere_.
|
||||
message(FATAL_ERROR "Could not find wolfssh in ${WOLFSSH_ROOT}. Try setting environment variable or git clone.")
|
||||
endif()
|
||||
|
||||
|
||||
|
@ -488,12 +488,12 @@ else()
|
|||
# We need to now determine if it is local and if so if it is part of the wolfssh repo,
|
||||
# or if wolfssh is simply installed as a local component.
|
||||
#
|
||||
|
||||
message(STATUS "Looking at WOLFSSH_PROJECT_DIR = '${WOLFSSH_PROJECT_DIR}'")
|
||||
if( EXISTS "${WOLFSSH_PROJECT_DIR}" )
|
||||
#
|
||||
# wolfssh found in local project.
|
||||
#
|
||||
if( EXISTS "${WOLFSSH_PROJECT_DIR}/wolfcrypt/" )
|
||||
if( EXISTS "${WOLFSSH_PROJECT_DIR}/wolfssh/" )
|
||||
message(STATUS "")
|
||||
message(STATUS "Using installed project ./components/wolfssh in CMAKE_HOME_DIRECTORY = ${CMAKE_HOME_DIRECTORY}")
|
||||
message(STATUS "")
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
# All paths should be given relative to the root
|
||||
|
||||
include ide/CSBENCH/include.am
|
||||
incldue ide/Espressif/include.am
|
||||
include ide/Espressif/include.am
|
||||
include ide/IAR-EWARM/include.am
|
||||
include ide/MQX/include.am
|
||||
include ide/STM32CUBE/include.am
|
||||
|
|
Loading…
Reference in New Issue