auth-skey.c (106130) | auth-skey.c (128460) |
---|---|
1/* 2 * Copyright (c) 2001 Markus Friedl. All rights reserved. 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 1. Redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer. --- 9 unchanged lines hidden (view full) --- 18 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 19 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 20 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 21 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 22 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23 */ 24#include "includes.h" 25RCSID("$OpenBSD: auth-skey.c,v 1.20 2002/06/30 21:59:45 deraadt Exp $"); | 1/* 2 * Copyright (c) 2001 Markus Friedl. All rights reserved. 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 1. Redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer. --- 9 unchanged lines hidden (view full) --- 18 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 19 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 20 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 21 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 22 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23 */ 24#include "includes.h" 25RCSID("$OpenBSD: auth-skey.c,v 1.20 2002/06/30 21:59:45 deraadt Exp $"); |
26RCSID("$FreeBSD: head/crypto/openssh/auth-skey.c 106130 2002-10-29 10:16:02Z des $"); | 26RCSID("$FreeBSD: head/crypto/openssh/auth-skey.c 128460 2004-04-20 09:46:41Z des $"); |
27 28#ifdef SKEY 29 30#ifdef OPIE 31#include <opie.h> 32#define skey opie 33#define skeychallenge(k, u, c) opiechallenge((k), (u), (c)) 34#define skey_haskey(u) opie_haskey((u)) --- 16 unchanged lines hidden (view full) --- 51skey_query(void *ctx, char **name, char **infotxt, 52 u_int* numprompts, char ***prompts, u_int **echo_on) 53{ 54 Authctxt *authctxt = ctx; 55 char challenge[1024], *p; 56 int len; 57 struct skey skey; 58 | 27 28#ifdef SKEY 29 30#ifdef OPIE 31#include <opie.h> 32#define skey opie 33#define skeychallenge(k, u, c) opiechallenge((k), (u), (c)) 34#define skey_haskey(u) opie_haskey((u)) --- 16 unchanged lines hidden (view full) --- 51skey_query(void *ctx, char **name, char **infotxt, 52 u_int* numprompts, char ***prompts, u_int **echo_on) 53{ 54 Authctxt *authctxt = ctx; 55 char challenge[1024], *p; 56 int len; 57 struct skey skey; 58 |
59 if (skeychallenge(&skey, authctxt->user, challenge) == -1) | 59 if (_compat_skeychallenge(&skey, authctxt->user, challenge, 60 sizeof(challenge)) == -1) |
60 return -1; 61 62 *name = xstrdup(""); 63 *infotxt = xstrdup(""); 64 *numprompts = 1; 65 *prompts = xmalloc(*numprompts * sizeof(char *)); 66 *echo_on = xmalloc(*numprompts * sizeof(u_int)); 67 (*echo_on)[0] = 0; --- 45 unchanged lines hidden --- | 61 return -1; 62 63 *name = xstrdup(""); 64 *infotxt = xstrdup(""); 65 *numprompts = 1; 66 *prompts = xmalloc(*numprompts * sizeof(char *)); 67 *echo_on = xmalloc(*numprompts * sizeof(u_int)); 68 (*echo_on)[0] = 0; --- 45 unchanged lines hidden --- |