examples: Reformat authenticaton.c

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
(cherry picked from commit 4c47719d98)
This commit is contained in:
Andreas Schneider
2018-09-20 14:32:26 +02:00
parent 034af66338
commit dfa7593c27

View File

@@ -24,7 +24,8 @@ clients must be made or how a client should react.
#include <libssh/libssh.h>
#include "examples_common.h"
int authenticate_kbdint(ssh_session session, const char *password) {
int authenticate_kbdint(ssh_session session, const char *password)
{
int err;
err = ssh_userauth_kbdint(session, NULL, NULL);
@@ -99,11 +100,13 @@ int authenticate_kbdint(ssh_session session, const char *password) {
return err;
}
static void error(ssh_session session){
static void error(ssh_session session)
{
fprintf(stderr,"Authentication failed: %s\n",ssh_get_error(session));
}
int authenticate_console(ssh_session session){
int authenticate_console(ssh_session session)
{
int rc;
int method;
char password[128] = {0};