mirror of
https://github.com/apache/nuttx-apps.git
synced 2025-10-24 03:03:57 +08:00
nshlib:add platform challenge function for nsh login
Signed-off-by: huangjian <huangjian@xiaomi.com>
This commit is contained in:
@@ -192,6 +192,26 @@ int nsh_telnetstart(sa_family_t family);
|
||||
void platform_motd(FAR char *buffer, size_t buflen);
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Name: platform_challenge
|
||||
*
|
||||
* Description:
|
||||
* If CONFIG_NSH_PLATFORM_CHALLENGE is defined, then platform-specific
|
||||
* logic must provide this function in order get the challenge.
|
||||
*
|
||||
* Input Parameters:
|
||||
* buffer - A caller allocated buffer in which to receive the challenge
|
||||
* buflen - The length in bytes of the caller allocated buffer
|
||||
*
|
||||
* Returned value:
|
||||
* None
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_NSH_PLATFORM_CHALLENGE
|
||||
void platform_challenge(FAR char *buffer, size_t buflen);
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Name: platform_user_verify
|
||||
*
|
||||
@@ -211,8 +231,13 @@ void platform_motd(FAR char *buffer, size_t buflen);
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_NSH_LOGIN_PLATFORM
|
||||
#ifdef CONFIG_NSH_PLATFORM_CHALLENGE
|
||||
int platform_user_verify(FAR const char *username, FAR const char *challenge,
|
||||
FAR const char *password);
|
||||
#else
|
||||
int platform_user_verify(FAR const char *username, FAR const char *password);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Name: nsh_system
|
||||
|
||||
Reference in New Issue
Block a user