Changeset View
Changeset View
Standalone View
Standalone View
auth2-chall.c
/* $OpenBSD: auth2-chall.c,v 1.50 2018/07/11 18:55:11 markus Exp $ */ | /* $OpenBSD: auth2-chall.c,v 1.53 2020/02/26 13:40:09 jsg Exp $ */ | ||||
/* | /* | ||||
* Copyright (c) 2001 Markus Friedl. All rights reserved. | * Copyright (c) 2001 Markus Friedl. All rights reserved. | ||||
* Copyright (c) 2001 Per Allansson. All rights reserved. | * Copyright (c) 2001 Per Allansson. All rights reserved. | ||||
* | * | ||||
* Redistribution and use in source and binary forms, with or without | * Redistribution and use in source and binary forms, with or without | ||||
* modification, are permitted provided that the following conditions | * modification, are permitted provided that the following conditions | ||||
* are met: | * are met: | ||||
* 1. Redistributions of source code must retain the above copyright | * 1. Redistributions of source code must retain the above copyright | ||||
Show All 13 Lines | |||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | ||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||||
*/ | */ | ||||
#include "includes.h" | #include "includes.h" | ||||
#include <sys/types.h> | #include <sys/types.h> | ||||
#include <stdarg.h> | #include <stdlib.h> | ||||
#include <stdio.h> | #include <stdio.h> | ||||
#include <string.h> | #include <string.h> | ||||
#include <stdarg.h> | |||||
#include "xmalloc.h" | #include "xmalloc.h" | ||||
#include "ssh2.h" | #include "ssh2.h" | ||||
#include "sshkey.h" | #include "sshkey.h" | ||||
#include "hostfile.h" | #include "hostfile.h" | ||||
#include "auth.h" | #include "auth.h" | ||||
#include "sshbuf.h" | #include "sshbuf.h" | ||||
#include "packet.h" | #include "packet.h" | ||||
▲ Show 20 Lines • Show All 99 Lines • ▼ Show 20 Lines | kbdint_reset_device(KbdintAuthctxt *kbdintctxt) | ||||
kbdintctxt->device = NULL; | kbdintctxt->device = NULL; | ||||
} | } | ||||
static void | static void | ||||
kbdint_free(KbdintAuthctxt *kbdintctxt) | kbdint_free(KbdintAuthctxt *kbdintctxt) | ||||
{ | { | ||||
if (kbdintctxt->device) | if (kbdintctxt->device) | ||||
kbdint_reset_device(kbdintctxt); | kbdint_reset_device(kbdintctxt); | ||||
free(kbdintctxt->devices); | free(kbdintctxt->devices); | ||||
explicit_bzero(kbdintctxt, sizeof(*kbdintctxt)); | freezero(kbdintctxt, sizeof(*kbdintctxt)); | ||||
free(kbdintctxt); | |||||
} | } | ||||
/* get next device */ | /* get next device */ | ||||
static int | static int | ||||
kbdint_next_device(Authctxt *authctxt, KbdintAuthctxt *kbdintctxt) | kbdint_next_device(Authctxt *authctxt, KbdintAuthctxt *kbdintctxt) | ||||
{ | { | ||||
size_t len; | size_t len; | ||||
char *t; | char *t; | ||||
int i; | int i; | ||||
▲ Show 20 Lines • Show All 225 Lines • Show Last 20 Lines |