=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/Attic/auth-rsa.c,v retrieving revision 1.64.2.2 retrieving revision 1.65 diff -u -r1.64.2.2 -r1.65 --- src/usr.bin/ssh/Attic/auth-rsa.c 2006/11/08 00:17:14 1.64.2.2 +++ src/usr.bin/ssh/Attic/auth-rsa.c 2006/03/19 18:51:18 1.65 @@ -1,4 +1,3 @@ -/* $OpenBSD: auth-rsa.c,v 1.64.2.2 2006/11/08 00:17:14 brad Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -14,33 +13,26 @@ * called by a name other than "ssh" or "Secure Shell". */ +#include "includes.h" + #include #include #include #include -#include -#include -#include - -#include "xmalloc.h" #include "rsa.h" #include "packet.h" +#include "xmalloc.h" #include "ssh1.h" #include "uidswap.h" #include "match.h" -#include "buffer.h" #include "auth-options.h" #include "pathnames.h" #include "log.h" #include "servconf.h" -#include "key.h" -#include "hostfile.h" #include "auth.h" -#ifdef GSSAPI -#include "ssh-gss.h" -#endif +#include "hostfile.h" #include "monitor_wrap.h" #include "ssh.h" #include "misc.h" @@ -73,12 +65,10 @@ if ((challenge = BN_new()) == NULL) fatal("auth_rsa_generate_challenge: BN_new() failed"); /* Generate a random challenge. */ - if (BN_rand(challenge, 256, 0, 0) == 0) - fatal("auth_rsa_generate_challenge: BN_rand failed"); + BN_rand(challenge, 256, 0, 0); if ((ctx = BN_CTX_new()) == NULL) - fatal("auth_rsa_generate_challenge: BN_CTX_new failed"); - if (BN_mod(challenge, challenge, key->rsa->n, ctx) == 0) - fatal("auth_rsa_generate_challenge: BN_mod failed"); + fatal("auth_rsa_generate_challenge: BN_CTX_new() failed"); + BN_mod(challenge, challenge, key->rsa->n, ctx); BN_CTX_free(ctx); return challenge; @@ -149,7 +139,7 @@ /* Wait for a response. */ packet_read_expect(SSH_CMSG_AUTH_RSA_RESPONSE); for (i = 0; i < 16; i++) - response[i] = (u_char)packet_get_char(); + response[i] = packet_get_char(); packet_check_eom(); success = PRIVSEP(auth_rsa_verify_response(key, challenge, response));