Deleted Added
full compact
auth-rsa.c (181111) auth-rsa.c (204917)
1/* $OpenBSD: auth-rsa.c,v 1.73 2008/07/02 12:03:51 dtucker Exp $ */
1/* $OpenBSD: auth-rsa.c,v 1.74 2010/03/04 10:36:03 djm Exp $ */
2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
5 * All rights reserved
6 * RSA-based authentication. This code determines whether to admit a login
7 * based on RSA authentication. This file also contains functions to check
8 * validity of the host key.
9 *

--- 79 unchanged lines hidden (view full) ---

89
90int
91auth_rsa_verify_response(Key *key, BIGNUM *challenge, u_char response[16])
92{
93 u_char buf[32], mdbuf[16];
94 MD5_CTX md;
95 int len;
96
2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
5 * All rights reserved
6 * RSA-based authentication. This code determines whether to admit a login
7 * based on RSA authentication. This file also contains functions to check
8 * validity of the host key.
9 *

--- 79 unchanged lines hidden (view full) ---

89
90int
91auth_rsa_verify_response(Key *key, BIGNUM *challenge, u_char response[16])
92{
93 u_char buf[32], mdbuf[16];
94 MD5_CTX md;
95 int len;
96
97 if (auth_key_is_revoked(key))
98 return 0;
99
97 /* don't allow short keys */
98 if (BN_num_bits(key->rsa->n) < SSH_RSA_MINIMUM_MODULUS_SIZE) {
99 error("auth_rsa_verify_response: RSA modulus too small: %d < minimum %d bits",
100 BN_num_bits(key->rsa->n), SSH_RSA_MINIMUM_MODULUS_SIZE);
101 return (0);
102 }
103
104 /* The response is MD5 of decrypted challenge plus session id. */

--- 220 unchanged lines hidden ---
100 /* don't allow short keys */
101 if (BN_num_bits(key->rsa->n) < SSH_RSA_MINIMUM_MODULUS_SIZE) {
102 error("auth_rsa_verify_response: RSA modulus too small: %d < minimum %d bits",
103 BN_num_bits(key->rsa->n), SSH_RSA_MINIMUM_MODULUS_SIZE);
104 return (0);
105 }
106
107 /* The response is MD5 of decrypted challenge plus session id. */

--- 220 unchanged lines hidden ---